Why does this:
fligner.test(a ~ b + c + d, data=df)
and this
fligner.test(a ~ b + d, data=df)
always equal for whatever data.
In the meantime, this
fligner.test(a ~ b + c + d, data=df)
and this
fligner.test(a ~ c + b + d, data=df)
do not equal.
Here is an example of data
set.seed(11)
df = data.frame(a=rnorm(12), b=factor(rep(c(1,2,3),4)), c=factor(rep(c(1,2),6)), d=rnorm(12))
It seems that only the first variable of the formula is considered. Does it mean that if we want to test the homoscedasticity of such model
aov(a ~ c + b + d, data=df)
we should run:
filgner.test(a ~ b, data=df)
filgner.test(a ~ c, data=df)
filgner.test(a ~ d, data=df)
and if all of them are not significantly heteroscedastic, we can accept that our model respect the assumption of homoscedasticity. Is it correct? Note that the same effect is found with the bartlett.test(..)