Repeated Measures of ANCOVA in R

343 Views Asked by At

I conducted a study. Here is the structure of the data: https://ibb.co/CzLK9jP repeated measures (mood_1 and mood_2) dependent variables, group is a between subject factor, and ruminati is a covariate.

I prepared the data like this in R: https://ibb.co/KWz9GPC However, I do not get the same result from R as I got from SPSS.

It is significant in SPSS, but not significant in R. What is exactly missing here to conduct the same think in the first picture?

model <- lm(depression ~ group * ruminati)
anova(model)
1

There are 1 best solutions below

0
On

Try this

ancova_model <- aov(depression ~ group + ruminati, data = data)