[R] leveneTest between 2-levels of 3-level factor in R?

Dr. Leigh S. Sutherland l.sutherland at tecnico.ulisboa.pt
Mon Oct 19 14:02:06 CEST 2015


Still feeling my way around using R...

What I have done so far:

I have a data.frame 'results' with response 'Fail', and three factors
'PREP', 'CLEAN' & 'ADHES'. ADHES has 3 levels: Crest Cryst Poly

I calculated the variances:

sigma..k=tapply(Fail,ADHES,var)
print(sqrt(sigma..k)):

Crest    Cryst     Poly 17.56668 41.64679 39.42669

then used leveneTest to test for constance of variance:

print(leveneTest(Fail~ADHES))

Levene's Test for Homogeneity of Variance (center = median)
      Df F value  Pr(>F)
group  2   3.929 0.02588 *
      51

The Question:
Now I want to use Levene's to test for constance of variance between only
the Cryst & Poly levels of the factor ADHES, but I cant work out the syntax
to do this in R.

Could anyone help, please?
​

	[[alternative HTML version deleted]]



More information about the R-help mailing list