[R] syntax of nlme

From: Thomas Wutzler <thomas.wutzler_at_web.de>
Date: Tue 12 Sep 2006 - 01:41:52 EST


Hello,

How do I specify the formula and random effects without a startup object ? I thought it would be a mixture of nls and lme. after trying very hard, I ask for help on using nlme.

Can someone hint me to some examples?

I constructed a try using the example from nls:

#variables are density, conc and Run
#all works fine with nls
DNase1 <- subset(DNase, Run == 1 )
fm2DNase1 <- nls( density ~ 1/(1 + exp((xmid - log(conc))/scal)),

                   data = DNase1,
                   start = list(xmid = 0, scal = 1),
                   trace = TRUE)

#Now I want to do a mixed model with covariate Run
#how is the syntax?

DNase12 <- subset(DNase, Run == 1 | Run == 2)
fm2DNase1 <- nlme( density ~ 1/(1 + exp((xmid - log(conc))/scal)),

                   data = DNase12,
                   fixed = conc ~ 1,
                   random = Run ~ 1,
                   start = list(xmid = 0, scal = 1)
)
#gives: Error in eval(expr, envir, enclos) : object "xmid" not found

Thomas



R-help@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 and provide commented, minimal, self-contained, reproducible code. Received on Tue Sep 12 03:03:54 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 12 Sep 2006 - 06:00:45 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.