[R] Random specification in LMER

Spencer Graves spencer.graves at pdf.com
Fri Apr 14 23:52:57 CEST 2006


(see inline)

Arnaud Ghilain wrote:

> Hello,
> 
> Can anybody help me understand the difference between the three different codes
> in specifying the slope in the random part of a mixed model using LMER?
> 
> Here are the codes:
> 
> (age | id)
> (1 + age | id)

SG:  These to are the same:  For each level of "id", both estimate 
random deviations for intercept and slope for age plus a covariance 
matrix for these two random parameters.

> (age - 1 | id)

SG:  For each level of "id", this estimates only a random deviation for 
slope for age plus a variance for that random slope.

SG:  "(1|id)+(age-1|id)":  For each level of "id", this estimates a 
random deviation for both intercept and slope for age plus a variance 
for each term assuming their covariance is 0.

SG:  See Douglas Bates (2005) "Fitting linear mixed models in R", R 
News, 5(1):27-30 ("www.r-project.org" -> Documentation:  Newsletter). 
Also, if you haven't already done this, you might want to review the 
vignette in library(MlmRev).

	  hope this helps.
	  spencer graves
> 
> Thank you in advance
> 
> Arnaud
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list