Dear Help-list, How can I do a multiple comparison test (mct) on selected 
contrasts from a linear model while using packages lme4 and multcomp?  I am 
running R 2.13.0 under Windows 7.  The following linear model and mct produces 
a global mct of 15 paired contrasts of the combined (Site, Position) factor 
SitePos of which only 9 are of interest.  Model.G = lmer(log10(SrCa) ~ SitePos 
+ (1 | Eel), data = Data1)
Model.G.mct = glht(Model.G, linfct = mcp(SitePos = "Tukey"))summary 
(Model.G.mct)  The following code creates the desired reduced set of contrasts 
but I have been unable to apply it correctly to the mct.   contr = rbind("CR 
core - MH core" = c(1,0,0,-1,0,0),"CR core - CR edge" = c(1,0,-1,0,0,0),
"CR core - CR EC" = c(1,-1,0,0,0,0,0),"CR edge - MH edge" = c(0,0,1,0,0,-1),
"CR edge - CR EC" = c(0,-1,1,0,0,0),"CR EC - MH EC" = c(0,1,0,0,-1,0),
"MH core - MH edge" = c(0,0,0,1,0,-1),"MH core - MH EC" = c(0,0,0,1,-1,0),
"MH edge - MH EC" = c(0,0,0,0,-1,1)) Execution of this code produces the error 
message: In rbind ('CR core - MH core" = c(1,0,0,-1,0,0), etc.: number of 
columns of results is not a multiple of vector length (arg 1)'.  
Model.G.mct2 = glht(Model.G, linfct = mcp(SitePos = contr))  #execution 
produces "Error in linfct{[nm]} %*% c: non-comformable argument", as a 
consequence of the previous error
summary (Model.G.mct2, test = adjusted(summarytype = "single-step")) Clearly, 
this approach is incorrect (and I have tried others).  How can I introduce the 
selected set of contrasts into the mct?  Thanks for any help provided.  
Regards,B. Jessop                                    
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to