I am working with the Python implementation of Google's CausalImpact package. My data is at daily frequency (365 observations per year); however, to inspect the effect of intervention, my pre-period is approximately 5 months long, and my post-period is approximately 5 months long. My full-range data (longer about 3 years) clearly shows yearly seasonality.

My question: how do I set the model up for yearly seasonality?

dated_data = df

pre_period = ['2018-01-01', '2018-06-05'] # Prior to known event

post_period = ['2018-06-06', '2019-11-25'] # After first, before second event

ci = CausalImpact(dated_data, pre_period, post_period, prior_level_sd=None, niter=1000, nseasons=[{'period': ???}], seasonal_duration=???)'

Any advice would be most welcomed.


closed as off-topic by user158565, Peter Flom Jun 28 at 12:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Peter Flom
If this question can be reworded to fit the rules in the help center, please edit the question.