Hello,

I'm trying to use NLME for a non-linear model with one random effect
that is the same as the one grouping level (chamber).  Using the following
statement:

test <- nlme(flux ~ b0 * exp((b1*soiltemp) - (b2*soiltemp^2))
* vpd^b3 * mstsoil2^b4 * airtemp^b5, data = ac5,
fixed = list(b0 + b1 + b2 + b3 + b4 + b5 ~ 1),
random = chamber ~ 1,
start = c(b0 = 570, b1 = 0.08, b2 = 0.002,
b3 = -0.06, b4 = 3, b5 = 0.3), subset = airtemp > 0)

I always get the error message
"Error in eval(expr, envir, enclos) : object 'chamber' not found"

Data "ac5" is a groupedData object with chamber as the grouping factor:
head(ac5)
Grouped Data: flux ~ soiltemp + vpd + mstsoil2 + airtemp | chamber

I've tried many variations such as
random = list(chamber ~ 1)
or adding the "groups" statement or trying to put chamber on the
RHS of the model statement, after the fixed effects,
but I always get the same error message.

What is the correct way to formulate the call to nlme?

Thank you in advance.

Toby Gass

tobygass at cnr dot colostate dot edu

______________________________________________
R-help@r-project.org 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