google / CausalImpact

An R package for causal inference in time series
Apache License 2.0
1.71k stars 254 forks source link

Rationale for explicit bsts parameters in `CausalImpact::ConstructModel` for StaticRegression #71

Open bsaunders27 opened 10 months ago

bsaunders27 commented 10 months ago

Bit newer to the package (and just recently returning to R) so good chance this question has an easy answer that I haven't come across yet. I was curious on the rationale behind setting explicit parameters for expected.model.size, expected.r2, and prior.df in the bsts.model.size and not enabling any means of optionally setting. I'd imagine that the appropriate number of covariates would vary significantly depending on the type of data, so surprised me that this was an unadjustable static value.

Obviously can go through the trouble of building a bsts model separately (and maybe that's more common than I'm realizing) but would be great to know if there's a reason behind the assumptions before trudging off to do that. Thanks!