Beginner Question / Linear Regression + Causal DAG

So I’d use pm.model_to_graphviz to help diagnose any structural issues in how you’ve composed the model.

What you are saying about the relation between age and height and age and weight… at the moment you are assuming a linear relationship. No reason why you can’t extend that to a quadratic. But this is about modelling choices. So the approach is to plot the data you have, or plot data from studies and use that to inform your modelling choices.

I’d also recommend running prior and posterior predictive checks and make extensive use of plotting to get more insight into whether the model is behaving how you intend. You can iterate from there.

You might find my mediation analysis example useful?

3 Likes