I ran a test to see if a treatment had an effect. Treatment started in 2011
on week 16
. Normally, we would take difference of the average percent change from the pre
group vs the average percent change of the post
group. This gives us a sense of what kind of percent change we would expect to see.
week 2010 2011 type
1 3998 3934 pre
2 3865 3775 pre
3 3960 3872 pre
4 3915 3820 pre
5 4145 4057 pre
6 4298 4213 pre
7 4399 4313 pre
8 4341 4225 pre
9 4416 4318 pre
10 4465 4376 pre
11 4471 4438 pre
12 4591 4566 pre
13 4804 4640 none
14 4865 4796 none
15 4865 4871 none
16 4861 4907 post
17 4922 4982 post
18 5222 5297 post
19 5296 5384 post
20 5434 5520 post
21 5520 5614 post
22 5520 5614 post
23 5521 5618 post
I would like to know if there is a more statistical way to approach this problem.
If you use R
then here is the dput
to copy and paste,
data = structure(list(week = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), y2010 = c(3998,
3865, 3960, 3915, 4145, 4298, 4399, 4341, 4416, 4465, 4471, 4591,
4804, 4865, 4865, 4861, 4922, 5222, 5296, 5434, 5520, 5520, 5521
), y2011 = c(3934, 3775, 3872, 3820, 4057, 4213, 4313, 4225,
4318, 4376, 4438, 4566, 4640, 4796, 4871, 4907, 4982, 5297, 5384,
5520, 5614, 5614, 5618), type = c("pre", "pre", "pre", "pre",
"pre", "pre", "pre", "pre", "pre", "pre", "pre", "pre", "none",
"none", "none", "post", "post", "post", "post", "post", "post",
"post", "post")), .Names = c("week", "y2010", "y2011", "type"
), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-23L))