[R] adjusted t-test with unequal variance
Greg.Snow at imail.org
Thu Oct 9 15:02:17 CEST 2008
Try the gls function in the nlme package. It allows you to model the variance as well as the mean.
From: "Bunny, lautloscrew.com" <bunny at lautloscrew.com>
To: "r-help at r-project.org" <r-help at r-project.org>
Sent: 10/9/08 3:40 AM
Subject: [R] adjusted t-test with unequal variance
right now i am simply comparing means. obviously this can be done by
the simple t.test respectively the welch test, if var.equal is set to
just like this
t.test( Y ~ group)
t.test( Y ~ group, var.equal = FALSE)
now that i need to compare weighted means i am using the lm function
as an adjusted t-test:
lmtest <- ( Y ~ group )
basically this delivers just the same means and p.value like the test
with equal variance.
and here's where my problem is...:
checking bartletts test and the var.test i found that the assumption
of equal variance might be at least venturesome for some of my
Can I replace the lmtest by something else, assuming variances are not
equal ? I read about a quasi option of glm on the mailing lists...
Thx in advance for any suggestions
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help