I'm wanting to use a custom bsts model within the CausalImpact package, and I understand that I need to use a control group in my data; however, I don't really understand where that control group fits within the bsts model.
I know my dependent variable is from the test group and that my independent variables are from the control group. I'm confused at how that looks when actually making the model.
For example, if I want to predict sessions of the test group, would I just have a few control groups and use their sessions to predict? Or do I use one control group and use its predictor values?
Here's the code I would theoretically write for both of those scenarios:
Scenario 1:
bsts( test_sessions ~ control1_sessions + control2_sessions + control3_sessions, data = data, ss, niter = 1000)
Scenario 2:
bsts(test_sessions ~ control1_adwords+ control1_paidkeywords+ control1_organickeywords, data = data, ss, niter = 1000)