Bayesian Framework For Causal Inference In Complex Data Structure