0

I am trying to run a repeated measures MANOVA using the MANOVA.RM package. My data looks like this:

Group   Subject  Trial  Measure_1   Measure_2
  1        1       1         44        15
  1        2       1         78        17
  2        3       1         38        13
  2        4       1         61        19
  3        5       1         67        28
  3        6       1         76        18   

I attached my df and then used an lm() function to set up my model:

dependents <- cbind(mydata$Measure_1, 
                    mydata$Measure_2)
group <- as.factor(mydata$Group)
trials <- as.factor(mydata$Trial)

fit <- lm(dependents ~ group*trials, mydata)

Finally, I used the model in a repeated measures MANOVA function using RM from MANOVA.RM:

dfRepeated <- RM(fit, data = "mydata", 
                    subject = "Subject", 
                    no.subf = 1, iter = 10000, alpha = 0.10,
resampling = "Perm", CI.method = "t-quantile", dec = 3)`

Then I receive this error: Error in RM(fit, data = "mydata", subject = "Subject", no.subf = 1, : The subject variable is not found!

The name of my subject column is exactly the same as what I put in the RM function.

Can someone please help?

0 Answers0