-----Oorspronkelijk bericht-----
Van: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] Namens nrm2010
Verzonden: donderdag 24 februari 2011 23:16
Aan: r-sig-mixed-models at r-project.org
Onderwerp: [R-sig-ME] NLME model syntax
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:
Grouped Data: flux ~ soiltemp + vpd + mstsoil2 + airtemp | chamber
I've tried many variations such as
random = list(chamber ~ 1) or random = ~1|chamber
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? Or is
this not a syntax error?
Thank you in advance.
Toby Gass
tobygass at cnr dot colostate dot edu