Open juanitorduz opened 2 years ago
Hi Juan, thank you for your suggestions!
We would like to start working on a first draft of a python implementation, as soon as we have a more stable version of our R package, hopefully at the beginning of next year.
We could use this function statsmodels.tsa.arima.model.ARIMAResults.simulate to run the bootstrap simulations, extracting the needed parameters from a pmdarima
or we could implement our version of bootstrap. For the closed formula solution, pmdarima
should be enough.
Anyway, if you or other people want to help us, we are more than happy!
Yes, indeed by looking into these lines of the python package they are using simulation to estimate prediction intervals.
I think I won't be able to be an active contributor but I will be happy to review and test the code ;)
Hi! This is more a suggestion on how a potential python implementation could look like.
The package
pycausalimpact
is a nice python implementation of the CausalImpact approach based on theUnobservedComponets
model ofstatsmodels
. This implementation is not fully bayesian and relies on Maximum Likelihood Estimation.This package uses the
UnobservedComponets
model here. The idea would be to replace or extend it to use theSARIMAX
model. Note that bothUnobservedComponets
andSARIMAX
part of thestatsmodels.tsa.statespace
module.Note that there is no "auto-arima" in
statsmodels
, but python users often just couple it with theAutoARIMA
function from thepmdarima
package (which by itself is based on theforecast
R package).I will be happy so help, but at the moment I do not have the capacity to port
CausalArima
to python. Nevertheless, maybe this suggestion triggers some initial draft implementations :)