1
$\begingroup$

I was utilising CausalImpact for a study. Only recently did I realise that the model described in the associated paper was different to the default model implemented in the package.

The paper was read like the default model was Local Linear Trend model for the structural time series. However, the default model used in the package is Local Level Model.

Could the author confirm this?

I think the author should probably make this clear in their online document or in the package help.

$\endgroup$
1
$\begingroup$

The default model in CausalImpact is defined in CausalImpact:::ConstructModel:

https://github.com/google/CausalImpact/blob/master/R/impact_model.R

A model with too many components can sometimes offer too much flexibility, providing unrealistically widening forecasts. This is why the default model does not include a local linear trend component, as you pointed out. You can add this and other components by defining a custom model:

https://google.github.io/CausalImpact/CausalImpact.html#using-a-custom-model

$\endgroup$
  • $\begingroup$ Thanks for the reply. I realised the difference between the paper description and package implementation when I tried to customise the model with bsts package and applied to the same dataset. And indeed, the use of local linear trend model resulted in a complete different fit and forecast. $\endgroup$ – Fred Mar 13 '17 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.