#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

# Levene's test (Rptd measures ANOVA or ANCOVA) - no change with covariate added

Hello,

When running Levene's test within the Rptd measures ANOVA or ANCOVA the value of F and p are the same if the covariate is or is not included in the model. This behaviour is not in line with the SPSS output.

Which output should be interpreted to correctly check the assumption when using a covariate?

For the example data below

covariate t1 t2 group
2 5 3 1
3 3 4 1
5 5 6 1
7 7 7 1
2 8 3 1
5 4 3 2
5 7 6 2
2 4 2 2
4 3 6 2
4 4 9 2

When the covariate is not included both SPSS and JASP provide this output:

F df1 df2 Sig
t1 .619 1 8 .454
t2 .898 1 8 .371

When the covariate is included JASP provides the same output as above.

However SPSS provides:

F df1 df2 Sig
t1 .411 1 8 .539
t2 5.584 1 8 .046

Thanks

Andy

• Hi Andy,

I'll put this on the GitHub page and will get back to you.

Cheers,
E.J.

• Hi Andy,
Thanks for pointing out this discrepancy! I took a look at what JASP and SPSS do when computing the Levene's test statistic, with and without a covariate.
First off, Levene's test can be viewed as an ANOVA on the absolute residuals of the ANOVA-model. For example, if you want to perform such a test in R, the following code will give the same Levene results as you provided, for the first measurement (t1):
`myaov_t1 <- aov(DV ~ Group, data=subset(ldf, Time==1)) summary(aov(abs(myaov_t1\$residuals) ~ Group, data=subset(ldf, Time==1)))}`
where ldf is the long-format dataframe with the example data you provided.

Now, the same can be done for an ANCOVA. The only thing that changes is the formula specified - instead of DV ~ Group, we specify the formula DV ~ Group + Cov:
`myaov_t1 <- aov(DV ~ Group + Cov, data=subset(ldf, Time==1)) summary(aov(abs(myaov_t1\$residuals) ~ Group, data=subset(ldf, Time==1)))}`

Running this will give the altered results that SPSS provides. Due to the R-function that is used in JASP (LeveneTest), which does not take into account a covariate, the JASP results are not affected by adding a covariate.

Again, thanks for pointing this out - I will try my best to fix this as soon as possible!
Cheers,
Johnny