pymc-labs / CausalPy

A Python package for causal inference in quasi-experimental settings
https://causalpy.readthedocs.io
Apache License 2.0
834 stars 53 forks source link

Add AR model for interrupted time series #4

Open drbenvincent opened 1 year ago

drbenvincent commented 1 year ago

2 added a very simple interrupted time series example with no predictors.

But it would be good to add another example where there is more temporal structure. This would then we well suited for an actual time series model, here an AR model.

TODO

drbenvincent commented 1 year ago

Now we have a sklearn.linear_model.LinearRegression model. When we add month as a categorical variable, this does a good job of fitting the seasonality component.

But we do still need a proper time series model here.

drbenvincent commented 9 months ago

Just dropping in a link to the developments on state space models by @jessegrabowski here https://discourse.pymc.io/t/state-space-models-in-pymc/9146