Dear statisticians of the list,

I am a limma user and have a small data set that I used the lme mixed effect model for analysis. I need some help in extracting comparisons from the result. I sent my questions to the R help list, but it appears that there is no people there care about the questions. I know my questions may not be related to this list, but if you would help could you please point me out what I can do or I should do something else? Your help will be greatly appreciated.

My data set is similar to the example data, Orthodont, and I used patient subject as a random effect and did something below:

library(nlme)
library(gregmisc)
data(Orthodont)
Orthodont$AgeGroup <- gtools::quantcut(Orthodont$age)
fm <- lme(distance ~ AgeGroup + Sex + AgeGroup*Sex, data = Orthodont, random = ~1|Subject)
fit.contrast(fm, "Sex", c(-1,1), conf=0.95)
fit.contrast(fm, "AgeGroup", rbind("1 vs 2"=c(-1,1,0,0), "2 vs 3"=c(0,-1,1,0)), conf=0.95)

But how can I compare different age groups among Male, Female or between Male and Female as illustrated below (age groups on rows):

## comparison among Male
     Male Female
[1,]   -1      0
[2,]    1      0
[3,]    0      0
[4,]    0      0

## among Female
     Male Female
[1,]    0      0
[2,]    0     -1
[3,]    0      0
[4,]    0      1

## between Male and Female
     Male Female
[1,]   -1      0
[2,]    0      0
[3,]    0      0
[4,]    0      1

JP Jin Ph.D.
Bioinformatics scientist
Center for Bioinformatics
UNC at Chapel Hill
Chapel Hill, NC


	[[alternative HTML version deleted]]

