[R] fromulation of random effects (nlme)

Uli Flenker; Raum 704 uli at biochem.dshs-koeln.de
Wed Mar 7 17:06:39 CET 2001


Dear all,

I have a problem formulating random effects when using the nlme package.
?nlme says that the random effects can be a formula or a list of formulae.

But when trying to do so, I run into trouble.
(R-1.2.2, nlme-3.1-10, Linux)

library(nlme)
example(nlme)	# works nice ...
fm1		# the fitted model

### Trying to update with different random effects

fm2<-update(fm1,random=list(Asym~1,R0~1))
# gives a "parse error"

fm2<-update(fm1,random=list(Asym=~1,R0=~1)) 
# nlme says that random effects are no formulae

In this case its possible of course to say "random = Asym + R0 ~1" which 
works (Well, it doesn't converge, but nlme tries to execute the code).
This formulation is  not possible with my own data unfortunately, as the
random effects are (likely to be) different with respect to two factors: I
need to express something like "random=list(b0 = ~1, b1 = ~treatment)".


When leaving away the random effects I get an error message as well, which
is straigthforward from the above, because
	
	nlme<-function(..., random=fixed, ...){lots-of-code}
                            ~~~~~~~~~~~~

and the fixed effects are expressed as (list of) formulae.

I had the same problem with R-1.2.1 and nlme-3.1-9.

Am I missing something? 

Thanks in advance ...

        Uli Flenker
        Institute of Biochemistry
        German Sport University Cologne
        Carl-Diem-Weg 6

        50933 Cologne / Germany

        Phone 0049/0221/4982-493


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list