[R-sig-ME] testing linear combinations of fixed effects coefficients

vlagani at ics.forth.gr vlagani at ics.forth.gr
Tue Jul 13 12:19:59 CEST 2010


Dear List,

I am interested in assessing the significance of a linear combination  
of fixed effects coefficients in my linear mixed model. In the nlme  
package this can be performed with the anova function and the "L"  
option (see the code snipet below); however, it seems to me that the  
anova function in lm4 does not allow a similar computation.

Reading some previous posts on the list (e.g.  
http://www.mail-archive.com/r-help@r-project.org/msg03028.html), I  
understood that I can *probably* use the variance covariance matrix  
returned by vcov in order to assess the confidence intervals of the  
linear combination I am interested in.
However, I would like to avoid a so complex solution, since it seems  
that there are a lot of "technical" difficulties, e.g. the matrix  
returned by vcov is only an estimation of the real variance covariance  
matrix.

As a possible alternative, I guess that I might use the empirical  
distributions provided by the MCMCglmm function in order to calculate  
the empirical distribution of any combination of model parameters...  
but I am not sure about this.

Thanks in advance for any answer!

Greets,

Vincenzo

############CODE################

library(nlme)

# the following model has four fixed effects coefficients: Intercept, age,
# SexFemale and age:SexFemale. I want to test if the linear combination
# age + age:SexFemale is significant (this test  is probably not meaningful
# in the contest of this model, but it is only for explanation purposes)
model  <-  lme(distance ~ age * Sex, data = Orthodont, random = ~ 1)

#summing the second (age) and fourth (age:SexFemale) coefficients
myL = c(0,1,0,1)

#testing the significance of the linear combination
anova(model, L = myL);




More information about the R-sig-mixed-models mailing list