Causal Impact 실습
data = read.csv('~/Dropbox/Lectures/CausalImpact/causalimpact.csv', header = T)
dim(data)
head(data)
pre.period <- c(1, 84)
post.period <- c(85, 96)
impact <- CausalImpact(data, pre.period, post.period,
model.args = list(niter = 10000, nseasons = 12, standardize.data = T))
#impact <- CausalImpact(data, pre.period, post.period,
# model.args = list(niter = 10000, nseasons = 12, standardize.data = T, dynamic.regression = T))
summary(impact)
plot(impact)
plot(impact$model$bsts.model, 'coefficient')
summary(impact, 'report')
plot(impact$model$bsts.model, 'coefficient')