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.

Reply via email to