InfluentialPoints.com
Biology, images, analysis, design...
Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

Search this site

 

 

Levene's test of homogeneity of variance - using R

Log transformed data

Levene's test of homogeneity of variance

using absolute residuals from the mean


Gives something like this:

Call: lm(formula = abs(joh$res) ~ vetjoh$trt) Residuals: Min 1Q Median 3Q Max -0.29124 -0.18975 -0.06431 0.08423 1.23705 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.293582 0.054007 5.436 7.98e-07 *** vetjoh$trtB 0.009168 0.081011 0.113 0.910 vetjoh$trtC -0.019974 0.075640 -0.264 0.793 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.27 on 68 degrees of freedom Multiple R-Squared: 0.002106, Adjusted R-squared: -0.02724 F-statistic: 0.07175 on 2 and 68 DF, p-value: 0.9308

 

Untransformed data

Levene's test of homogeneity of variance

using absolute residuals from the mean


Gives something like this:

Analysis of Variance Table Response: con Df Sum Sq Mean Sq F value Pr(>F) trt 2 4108.9 2054.5 7.3555 0.001283 ** Residuals 68 18992.9 279.3 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > summary(lm( abs(joh2$res) ~ vetjoh$trt)) Call: lm(formula = abs(joh2$res) ~ vetjoh$trt) Residuals: Min 1Q Median 3Q Max -15.625 -6.889 -1.878 2.936 50.175 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.289 2.237 7.282 4.39e-10 *** vetjoh$trtB -5.764 3.355 -1.718 0.0904 . vetjoh$trtC -8.350 3.133 -2.665 0.0096 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 11.18 on 68 degrees of freedom Multiple R-Squared: 0.09772, Adjusted R-squared: 0.07119 F-statistic: 3.682 on 2 and 68 DF, p-value: 0.03031