# NOT RUN {
### load data
data(ad_cost)
### define variables and visualize
y.exp = ad_cost$y.exp
y.con = ad_cost$y.con
plot(y.exp, col = "red", type = "l",
xlab = "time", ylab = "response")
lines(y.con, col = "blue")
### fit the model and return treatment/spillover effect
# notice that day-34 is the first day of treatment
fit = sportscausal(y.exp = y.exp, y.con = y.con,
pre.period = c(1:33), post.period = c(34:49), is.plot = FALSE)
fit$est.treatment
fit$est.spillover
# }
Run the code above in your browser using DataLab