I am working on the data set that consists of Patients' id (after stroke), Time (they can walk after going through the program), the Program they follow and the Visit number when the Time was measured.
Patient Program Time(walking) Visit(Check)
1 P1 12 Day 10
2 P3 23 Day 5
3 P3 8 Day 1
4 P2 36 Day 10
5 P1 10 Day 1
6 P2 86 Day 10
6 P1 13 Day 5
I am investigating whether there is evidence that the effects of different programs differ over time?
My approach was to consider the ANOVA test for the response variable Time (effect) and the Independent variable Program. In such a way:
new <- aov(Time~Programme, dane)
> summary(new)
Df Sum Sq Mean Sq F value Pr(>F)
Programme 2 398.4 199.2 0.61 0.58
Residuals 5 1633.5 326.7
But I am hesitant now about the fact that maybe the Visit column should be somehow included in this investigation?. Shall I use a different method to come up with an answer to that question (ex. regression? two-way ANOVA?)