[R] help with syntax of nlme function

From: Bill Shipley <bill.shipley_at_usherbrooke.ca>
Date: Fri 02 Jun 2006 - 01:12:17 EST

I am having difficulty understanding the syntax of the nlme() function for nonlinear mixed models. The data frame is called Marouane.chlorophyll. The model involves a dependent variable (Absorb) and an independent variable (Ch.surf), which are both numeric variables in the data frame. The data are hierarchically grouped as Espece, Plante nested within Espece, and Feuille nested within Plante (i.e. leaves within plants within species). Espece is defined as a factor and Plante and Feuille are defined as numeric in the data frame. There are two parameters (k1 and b) and I want to fit a model in which these two parameters vary randomly across Espece and Plante (with Feuille being the residual level). Here is how I have specified the call to nlme:  

> fit<-nlme(model=Absorb~ k1 - (1/(b*Ch.surf)),

+ data=Marouane.chlorophyll,fixed=k1+b~1,
+ groups=~Espece/Plante,
+ start=list(k1=97.8, b=4.68))

However, there is something wrong with this syntax because I get the following error:  

Problem in names<-: Invalid length for names attribute: structu re(.Data = list(structure(.Data = numeric(0), class ....  

Can someone explain what I am doing wrong?  

Bill Shipley

North American Editor, Annals of Botany

Editor, "Population and Community Biology" series, Springer Publishing

Département de biologie, Université de Sherbrooke,

Sherbrooke (Québec) J1K 2R1 CANADA



        [[alternative HTML version deleted]]

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 Received on Fri Jun 02 01:31:11 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 Mon 05 Jun 2006 - 08:10:41 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.