3
$\begingroup$

How do I supply yearly(month/week of the year) + day of the week seasonality in causal impact? I have 1 year of data in the pre period at daily granularity i.e. 365 data points. would, nseasons =52 and season.duration=7 work? Is there a better solution?

Also I noticed in one of the posts on stackexchange that pre period should not be too long, 3-10 weeks of daily rate is common.

My data has a prominent yearly seasonality, not sure if taking 3-10 weeks pre period will have an impact on output as the predictions wont be able to capture seasonality properly.

"A long pre-treatment period is better in principle. However, too long a pre-period means there is a chance that the structural relationship between your response variable and the predictors has changed over time. In practice, 3-10 weeks of daily data are very common. Another rule of thumb is to have about 2-3x as much data in the pre-period as in the post-period. " Link: Is it okay to run CausalImpact in R on successive portions of a time series?

$\endgroup$

Your Answer

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

Browse other questions tagged or ask your own question.