I am working on the data set that consists of Patients (after stroke), Time (then can walk after a going through the program), and Program they follow.
Patient Program Time
1 P1 12
2 P3 23
3 P3 8
4 P2 36
5 P1 10
I am investigating the influence of the program to the results of patients, but I also want to investiagte how much variation was due to the differences between the patients.
My approach was to consider the Between Group Variation using Anova and Tukey:
new <- aov(Patient~Programme, dane)
TukeyHSD(new)
-------------------------------------------
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = Patient ~ Programme, data = dane)
$Programme
diff lwr upr p adj
Program2-Program1 2.75 -4.294925 9.794925 0.4682698
Program3-Program1 2.50 -5.634778 10.634778 0.6082676
Program3-Program2 -0.25 -7.294925 6.794925 0.9926869
But I think it may not be a good way as it is not clear how much variation between the results was due to the patients.
Summary of anova:
> summary(new)
Df Sum Sq Mean Sq F value Pr(>F)
Programme 2 10.75 5.375 0.86 0.478
Residuals 5 31.25 6.250
Summary of Time - Programme ANOVA:
summary(new2)
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
summary(new)? That should produce some clues. – EdM May 19 '22 at 18:45Programme, as there isn't really anything that can be learned from a regression of an arbitrary numeric patient ID uponProgramme. Post the anova results ofTime ~ Programmeand I will provide a new answer. – EdM May 21 '22 at 13:45