Page 1 of 1

RM ANOVA sphericity assumption

Posted: Sun May 10, 2020 3:44 pm
by CLeach
I'm testing the sphericity assumption for a Repeated Measures ANOVA with time as the independent variable (baseline; 1 week; 10 weeks):

Baseline, Week 1 and Week 10 are entered as RM Factor 1 and transferred to Repeated Measures Cells. Sphericity tests ticked under Assumption Checks but it returns "The repeated measures has only two levels. The assumption of sphericity is always met when the repeated measures has only two levels."

Can anyone help? I would have thought that Baseline, Week 1 and Week 10 gives three levels? File is attached.

Thanks,
Cait

Re: RM ANOVA sphericity assumption

Posted: Mon May 11, 2020 10:40 am
by CLeach
UPDATE:

Sample size is 15, but if it's increased to 16 (i.e. random numbers added across all three time points for the purposes of investigating), testing for sphericity seems to work fine..?

UPDATE #2:

So the SD for two of the three levels is exactly the same, is this why Jamovi is interpreting it as only two levels in total?

Re: RM ANOVA sphericity assumption

Posted: Thu May 14, 2020 4:56 am
by jonathon
hey cleach,

let me attend ravi to this. this is his area.

cheers

jonathon

Re: RM ANOVA sphericity assumption

Posted: Sat May 16, 2020 11:57 am
by Ravi
Just a quick update that I'm looking into it!

Re: RM ANOVA sphericity assumption

Posted: Sun May 17, 2020 2:24 pm
by Ravi
So apparently there's some singularity issue, that's not being caught be the jamovi analysis. If you use the following R code (similar to what we use in the background):

Code: Select all

data <- data.frame(
    'id' = 1:15,
    'x1' = c(4, 13, 15, 12, 12, 2, 19, 10, 22, 13, 10, 22, 10, 14, 22),
    'x2' = c(55, 40, 26, 6, 20, 37, 37, 12, 45, 29, 28, 4, 26, 39, 30),
    'x3' = c(51, 36, 22, 2, 16, 33, 33, 8, 41, 25, 24, 0, 22, 35, 26)
)

data_long <- data %>% pivot_longer(cols = c('x1', 'x2', 'x3'), names_to = 'var')

res <- aov_ez("id", "value", data_long, within = c("var"), 
       anova_table=list(correction = "none", es = "none"))

res_sum <- summary(res)
res_sum$sphericity.tests
You get the following warning message:
Warning message:
In summary.Anova.mlm(object$Anova, multivariate = FALSE) :
Singular error SSP matrix:
non-sphericity test and corrections not available
Of course, we should catch this error in a better way and display some sort of warning message to the user.

Re: RM ANOVA sphericity assumption

Posted: Tue May 19, 2020 12:41 pm
by Ravi
Oke, I fixed it so that there's a more informative footnote in the table when this happens (https://github.com/jamovi/jmv/pull/256)

Re: RM ANOVA sphericity assumption

Posted: Sat May 23, 2020 2:25 pm
by CLeach
Thanks so much Ravi