# Comparison of variances with multiple factors using fligner kileen test

Hope my question fits in here and I have described everything well enough. Somehow I cant quite get my head around it.

I have a data set with pesticide residue data in flowers, which had been obtained from using two different application techniques (App (Hand/Track)). Samples were taken on 0-4 days after applications (DAA) in each treatment and each treatment had 5 replicates (n=5). Edit: The samples were taken on subsequent days from the same plants (so repeated measures). Now I would like to check whether one application technique has resulted in a higher variability in residues than the other technique. Therefore, I thought I could just compare the variances. As my data is non normal and skewed, I decided to use the Fligner-Killeen test.

fligner.test(Residues ~ interaction(App,DAA), data=Flow)


which results in

    Fligner-Killeen test of homogeneity of variances

data:  Residues by interaction(App, DAA)
Fligner-Killeen:med chi-squared = 22.844, df = 9, p-value = 0.006556


So, it is significant, meaning that some of the variances are not equal. But I wasnt quite sure how to interpret this and what the test is actually doing using the interaction term (which variances are compared)? Does it compare each application technique on each level of DAA (e.g. Hand 0 DAA vs Track 3 DAA)?

That is not really what I was interested in, I only wanted to compare the techniques on each individual DAA. Therefore I have used a subset of the data, in this example I compare the data only on 4 DAA:

fligner.test(Residues ~ App, data=Flow, subset=(Flow$DAA=="4")) Fligner-Killeen test of homogeneity of variances data: Residues by App Fligner-Killeen:med chi-squared = 0.069487, df = 1, p-value = 0.7921  So my next question would be, whether that would be an appropriate way to compare variances and whether it makes "statistically" sense to do it this way, if I have only n=5 for each treatment on one day? Many thanks in advance for any tips, maybe someone has a completely different approach to compare variability! second edit Doing some more research I found this post, which suggests to do an ANOVA and post hoc testing with the residuals. Sounds a more elegant way to compare variances, but my residuals are not normally distributed and hence dont meet the assumptions for an ANOVA. Could I transform the residuals (eg log transformation) and do a repeated measures anova and post hoc testing? As requested, but not sure whether you can see much: edit So running the following model with the absolute residuals as response gave me the following output. I think the residuals look alright in the summary, but looking at the plots there seems to be some pattern?  mod<-lmer(absres~App*DAA+(1|Repetition) , data=Flow)  • Some important info is missing. Is this repeated measurements data? That is, the measurements on five days are on the same plants? That is important! Please add clarifying information as an edit to the post, not only as a comment. Oct 28, 2020 at 13:20 • Thanks for the hint- I have edited the post accordingly. – Fee Oct 28, 2020 at 13:38 • Could you show us the plots, but with the five points from the same plant united with lines? That could be informative. Is the variability in plant random effects or in residuals? I think you need a mixed model. Some related posts: stats.stackexchange.com/questions/255546/… and stats.stackexchange.com/questions/192845/… and stats.stackexchange.com/questions/213591/… Oct 28, 2020 at 15:24 • I was thinking about doing something like this: mydata$absres <- abs(resid(lm(Residues ~ App*DAA, data=mydata))) mydata$lgabsres=log(mydata$absres) #log transform for normaility mod<-lmer(lgabsres~App*DAA+(1|Repetition) , data=mydata) anova(mod) contrasts2<-emmeans(mod, ~App*DAA, adjust="tukey") cld(contrasts2, alpha=0.05, Letters=letters,reversed=FALSE , adjust="tukey", by=c( "DAA" ))
– Fee
Oct 28, 2020 at 16:40
• The lines in the new plots do not cross much, so a lot of the variance must be in random effects. Go for mixed models! Oct 28, 2020 at 16:42