[R] lmer(): specifying i.i.d random slopes for multiple covariates

Fabian Scheipl f.abian at gmx.net
Thu Aug 24 15:58:32 CEST 2006


Dear readers,

Is it possible to specify a model

y=X %*% beta + Z %*% b ; b=(b_1,..,b_k) and b_i~N(0,v^2) for i=1,..,k

that is, a model where the random slopes for different covariates are i.i.d., in lmer() and how?

In lme() one needs a constant grouping factor (e.g.: all=rep(1,n)) and would then specify:
lme(fixed= y~X, random= list(all=pdIdent(~Z-1)) ) ,
that´s how it's done in the lmeSplines- documentation.

Any hints would be greatly appreciated- I'm trying to write a suite of functions that will transform additive models into their mixed-effects representation like lmeSplines but using lmer() instead of lme().

Thank you for your time,
Fabian Scheipl
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!



More information about the R-help mailing list