[R] t.test() with missing values

S Ellison S.Ellison at lgc.co.uk
Fri Sep 14 11:46:57 CEST 2007



>>> Peter Dalgaard <P.Dalgaard at biostat.ku.dk> 14/09/2007 09:26:16 >>>
>> So what can I do now to solve my problem?
>>
>> Do you think I should not use paired=TRUE?
>You *can* only use it when you have pairs, and you must do it then, to
>correct for intra-pair correlation. The drawback is that it looks only
>at complete pairs, throwing away all the singlets. It is possible to
>recover the information from the singlets , basically by combining a
>paired test for the pairs and an unpaired one for the singlets. (Someone
>must have written this down, but I'm afraid I don't have a nice reference).

Question: Could you achieve this kind of outcome with lme? stack the two groups, mark the observations y by subject (ie the pair ID) and group (treatment, presumably), and do something like

anova(lme(y~group, data=d, random=~1|subj, na.action=na.omit))

Or is that just disguising one of those nasty unbalanced 2-way anova problems?

*******************************************************************
This email and any attachments are confidential. Any use, co...{{dropped}}



More information about the R-help mailing list