We should look at the following package and see whether we can integrate it with JuliaBUGS. https://github.com/mschauer/CausalInference.jl https://github.com/StatisticalRethinkingJulia/StructuralCausalModels.jl