Working on my master thesis right now. I have 2 groups: Showering as usual and Cold shower group. Variables are age, gender, weight, psychological wellbeing, physiological wellbeing, sleep quality, movement behvaior, skin texture, shower behavior etc.
Head(data1)
Code Gruppe StudentBasel Alter Grösse Gewicht0W Gewicht12W
1 TURN12 2 Ja 50 159 70 72
2 AMMN17 1 Nein 26 164 52 50
3 LKPG08 2 Nein 19 167 54 NA
4 LJRn05 2 Nein 22 180 60 NA
5 AGBD08 1 Nein 24 165 49 NA
6 IUGH20 2 Nein 32 168 54 NA
Geschlecht WHO1W WHO4W WHO8W WHO12W FEW1W FEW4W FEW8W FEW12W
1 w 6 21 24 25 87 70 80 75
2 w 24 22 25 22 77 78 83 74
3 w 16 NA NA NA 65 NA NA NA
4 w 19 NA NA NA 61 NA NA NA
5 w 23 18 22 NA 61 61 56 NA
6 w 22 NA NA NA 66 NA NA NA
SchlafA1W SchlafA4W SchlafA8W SchlafA12W SchlafWT1W SchlafWT4W
1 32 25 25 30 49 32
2 35 31 35 28 46 43
3 28 NA NA NA 31 NA
4 23 NA NA NA 32 NA
5 27 28 26 NA 35 34
6 27 NA NA NA 41 NA
So. I have two groups and data from the 4th, 8th and 12th week. I want to compare the groups by the means on the 4th week. Running t-tests for every variable was not suggested because of some error i'm not considering. So I thought, I'll use an ANOVA like this
CSSAUW4 <- aov(formula = Gruppe ~ WHO4W + FEW4W + Dauer4W + SchlafA4W + SchlafWT4W + Einschlafzeit4W + Schwitzen + Haut4W + KHaut4W + Abwesenheit4W + Krankheitssymptome4W + Duschhäufigkeit4W,
data = Group4W)
So I got all my results and was pretty happy, but I wasn't able to conduct a TukeyHSD() test, cause "Group" was not a factor. So changed it to factor a factor with as.factor(), but now I can't calculate my ANOVA anymore. Apparently I did it all wrong and should have used a aov(numeric variable ~ group) to compare everything, but then I got the same problem like on the variant with the t-test to write every code for every single variable.
So I read something about lme4 ANOVA's but I find it really difficult to understand how to code it for my data since i successfully dodged every R course in my university. I'd like to have some simple coding like: Test(Group ~ variable1, variable2, variable3, data=data1) and that's it. For Week4, Week8, Week12.
I was thinking of using lm(group ~ variable1, variable2, etc.) instead. Would that be possible and make sense for my data? I'm doubting my statistical intelligence is right on that one :D
Second question: I have the problem of having a little dataset (loss to follow up for the 12th week of 90%). So at the moment I got only 8 participants in each group. Can I do the same mean comparison on the 12th week like on the 4th week (with 25 participants each)?
Help would be really appreciated!!
Greetings Christian