# CausalImpact - Is pre-processing of covariates required?

I'm using the CausalImpact package to evaluate the effect of a programme. My covariates are seasonal and I wonder whether I need to deseasonalise/ detrend the regressors before using the R package?

Hal Varian did this in the below analysis:

http://people.ischool.berkeley.edu/~hal/Papers/2013/pred-present-talk.pdf

slide 24:

• Deseasonalize predictors using R command stl
• Detrend predictors using simple linear regression
• Let bsts choose predictors
• No, you can use seasonality within causalimpact itself. The documentation clearly provides on how this could be done. – forecaster Jun 28 '15 at 19:30
• Yes, and with a customised bsts model? When I evaluate the fit of the bsts model before I pass it into Causalimpact, would i need to pre-process the data to fit the bsts model? – TinaW Jun 30 '15 at 22:30

Using raw predictors in CausalImpact (or bsts) has the advantage that your counterfactual predictions automatically inherit the seasonality structure contained in your predictors (e.g., day-of-week as well as seasonal effects throughout the year and their interactions).
Deseasonalizing your predictors, on the other hand, can be a useful strategy in cases where seasonal variation dominates all other features in your predictors, making it potentially harder for the regression component to find the right combination of predictors. In this case you'll want to include an explicit seasonal component in the model (using model.args in CausalImpact() or AddSeasonal() in bsts()). See the documentation for details.