Lu, Z., Geng, Z., Li, W., Zhu, S., & Jia, J. (2023). Evaluating causes of effects by posterior effects of causes. Biometrika, 110(2), 449–465. https://doi.org/10.1093/biomet/asac038
Simple python code to calculate Posterior Total Causal Effect (PostTCE) and Posterior Direct Causal Effect (PostDCE).
Variables: cause variables
k: int,
Obs: np.array, observed evidence
Pr_joint: numpy.ndarray, joint probability, Pr_joint[x[0],...,x[p-1],y] =