Last active
August 29, 2015 14:08
-
-
Save MarkEdmondson1234/d489bc867be7eeb453bb to your computer and use it in GitHub Desktop.
Apply CausalImpact package to the GA output.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## do the causalImpact | |
# here the effect took place on the 200th day of the data imported, so the pre.period = 200 | |
# Data is examined and compared in the post perid to day 244 | |
impact <- CausalImpact(data = gadata$visits, | |
pre.period = c(1,200), | |
post.period = c(201,244), | |
model.args = NULL, | |
bsts.model = NULL, | |
post.period.response = NULL, | |
alpha = 0.05) | |
plot(impact) | |
# this gives you a nice verbose report | |
impact$report |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment