You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, from looking at the code I can see that CausalImpact generates the posterior predictive samples by getting the state value draws and sampling noise with variance equal to the sigma.obs draws from the bsts model object.
When I try to replicate the inference step using predict.bsts, I get different results. In particular, the credible intervals produced by generating the posterior predictive with bsts.predict are larger than CausalImpact suggests. The bounds of the relative difference credible interval can differ by 2-3%. Is there inherently a difference between how CausalImpact prediction and predict.bsts works? I've attached example code below.
I ran across this issue as well. My guess is that the difference lies in the fact that predict.bsts is predicting from period 101 onward. If you check bsts_model$timestamp.info from the code above and compare it to the what the predict.bsts help docs say it makes sense:
The time stamps give the time points as which each prediction is desired. They must be interpretable as integer (0 or larger) time steps following the last time stamp in object. If NULL, then the requested predictions are interpreted as being at 1, 2, 3, ... steps following the training data.
Hi, from looking at the code I can see that
CausalImpact
generates the posterior predictive samples by getting the state value draws and sampling noise with variance equal to thesigma.obs
draws from the bsts model object.When I try to replicate the inference step using
predict.bsts
, I get different results. In particular, the credible intervals produced by generating the posterior predictive withbsts.predict
are larger thanCausalImpact
suggests. The bounds of the relative difference credible interval can differ by 2-3%. Is there inherently a difference between howCausalImpact
prediction andpredict.bsts
works? I've attached example code below.The text was updated successfully, but these errors were encountered: