[R] combined random effects

Douglas Bates bates at stat.wisc.edu
Wed Mar 24 14:09:58 CET 2004


Joerg Schaber <Joerg.Schaber at uv.es> writes:

> Hi,
> 
> I have the following linear mixed model:
> 
> y(g,i,j,k,l)=u + L(g) + T(i) + D(j) + S(k) + (TS)(i,k) + error(g,i,j,k,l)
> 
> where S(k) and the combined effect (TS)(i,k) are random effects
> whereas the rest are fixed effects.


> How do I specifiy the random part of the model formula in lme(),
> especially concerning the combined effect (TS)?

I think you should be able to specify this as
    random = ~ 1 | SLIDE/TREAT

> Moreover, when I run the model as a fixed effect model I get the
> following error:
> 
> 
>  > lm(logMed ~ lenAA + TREAT + DYE + SLIDE + SLIDE:DYE,data=MA)
> Error in lm.fit(x, y, offset = offset, ...) :
>         NA/NaN/Inf in foreign function call (arg 4)
> 
> However, when I run the model with a reduced data set it works.
> 
> In the first case I have 16512 data points whereas in the reduced case
> I use only half of it. Do I reach some internal threshold here?

You should get a different error message if you did reach a threshold.

I'd offer to look at the problem in more detail except that I just
learned that one of the main servers in the r-project.org domain (the
one that serves as cran.us.r-project.org, among other things) has
crashed and I need to get in to the office to check on it.

-- 
Douglas Bates                            bates at stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/




More information about the R-help mailing list