[R] syntax of nlme with nesting

From: Bill Shipley <bill.shipley_at_usherbrooke.ca>
Date: Fri 28 Oct 2005 - 06:57:20 EST


This may appear too elementary to some on this list, but not to me. My apologies if this is the case. I have mastered the lme function but the nlme function has me stumped.  

I am attempting to fit a nonlinear mixed model with 4 levels of nesting. I am getting a cryptic error message and do not know what is wrong with the syntax of the call. This is the call:  

> nlme(Photosynthese~NRhyperbola(Irr,theta,Am,alpha,Rd),

+ fixed=theta+Am+alpha+Rd~1,

+ random=theta~1|Reference/Espece/Plante/Groupe,

+ data=lit.data)  

NRhyperbola is a self-starting function with one variable (Irr) and four parameters (theta,Am,alpha,Rd). The data set (lit.data) contains Photosynthese (dependent variable) and Irr, as well as the grouping structure, which is Reference, Espece nested in Reference, Plante nested in Espece and Groupe nested in Plante. I want to allow only the parameter theta to vary randomly. I get the following error message: "Error: subscript out of bounds".  

What does this mean? There are some "Plante" for which there is only one "Groupe" , some "Espece" for which there is only one "Plante" etc. Is this the source of the error? If so, how can one solve this?  

Bill Shipley  

        [[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 Oct 28 07:29:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:51 EST