Variance homogeneity in two or more groups

TODO

  • link to variance

Install required packages

car, coin, beeswarm

Compare two groups

Boxplot with added beeswarm plot

plot of chunk rerVarHom01
plot of chunk rerVarHom01

\(F\)-test for variance ratio in two groups


    F test to compare two variances

data:  DV by IV
F = 1.5437, num df = 49, denom df = 39, p-value = 0.1632
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
 0.8361247 2.7913772
sample estimates:
ratio of variances 
          1.543726 

Mood-test for two groups (nonparametric)


    Mood two-sample test of scale

data:  DV by IV
Z = 1.8065, p-value = 0.03542
alternative hypothesis: greater

Ansari-Bradley-test for two groups (nonparametric)


    Ansari-Bradley test

data:  DV by IV
AB = 1025, p-value = 0.02116
alternative hypothesis: true ratio of scales is greater than 1

    Exact Two-Sample Ansari-Bradley Test

data:  DV by IV (1, 2)
Z = -2.0304, p-value = 0.02138
alternative hypothesis: true ratio of scales is greater than 1

Compare more than two groups

Boxplot with added beeswarm plot

plot of chunk rerVarHom02
plot of chunk rerVarHom02

Levene-test

Levene's Test for Homogeneity of Variance (center = median)
      Df F value Pr(>F)
group  2  0.5531 0.5782
      57               
Levene's Test for Homogeneity of Variance (center = mean)
      Df F value Pr(>F)
group  2  0.5865 0.5596
      57               

Fligner-Killeen-test


    Fligner-Killeen test of homogeneity of variances

data:  DV by IV
Fligner-Killeen:med chi-squared = 0.68727, df = 2, p-value = 0.7092

    Approximative K-Sample Fligner-Killeen Test

data:  DV by IV (1, 2, 3)
chi-squared = 0.68727, p-value = 0.7067

Detach (automatically) loaded packages (if possible)

Get the article source from GitHub

R markdown - markdown - R code - all posts