[R-sig-ME] NLME model syntax

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Fri Feb 25 10:29:37 CET 2011


Have you tried to use a regular data.frame instead of a groupedData object?

Best regards,

Thierry

----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
  

> -----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: 
> 
> > head(ac5)
> 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
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 



More information about the R-sig-mixed-models mailing list