[R] adjusted t-test with unequal variance

Bunny, lautloscrew.com bunny at lautloscrew.com
Thu Oct 9 11:39:59 CEST 2008


Hi all,


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  
FALSE.

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:

like

lmtest <- ( Y ~ group )
anova(lmtest)

lmtest$fitted.values[data$group==1]
lmtest$fitted.values[data$group==0]


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  
variables...

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



More information about the R-help mailing list