[R] 2: lme4 ---> GLMM

Pavel Khomski pkhomski at wiwi.uni-bielefeld.de
Tue Feb 8 15:11:18 CET 2005


Douglas Bates wrote:

>
> The GLMM function in the lme4 package allows you to specify crossed 
> random effects within the random argument without the need for the 
> pdBlocked and pdIdent constructions.  Simply ensure that your grouping 
> factors are defined in such a way that each distinct group has a 
> different level in the grouping factor (this is usually not a problem 
> for crossed grouping factors but can be a problem with nested factors) 
> and list them.  For example
>
>   random = list(rows = ~ 1, columns = ~1)
>
>
the reason is that i actually want to use just one group. factor with 
two and more blocks, each of them would have the simple diag. structure,
just as was possible with  like pdIdent(...,...,...) specification in 
nlme-package. i also wanted to give initial values via  value=....,
so i would really need to define  i.e.:

random=list(my.Subject=pdBlocked(pdIdent(value=labda1, 
form=~var.a1+...+var.am, nam=...), pdIdent(value=labda2, 
form=~var.b1+...+var.bn, nam=...),...))

or just, because "pdBlocked" is not accepted

random=list(my.Subject=list(pdIdent(value=labda1, 
form=~var.a1+...+var.am, nam=...), pdIdent(value=labda2, 
form=~var.b1+...+var.bn, nam=...),...))

or for last, if really were possible, alternatively without  having 
attached nlme:

random=list( form=~var.a1+...+var.am | my.Subject),  
form=~var.b1+...+var.bn | my.Subject , ... )


but each time i recieve

Error in switch(mode(x), "NULL" = structure(NULL, class = "formula"),  :
   invalid formula


so i don't know, how  it can go.
the reason for trying to use the lme4 is its sparse-matrix orientation 
and so comutationally more efficient.

thank you for hint in advance




More information about the R-help mailing list