Hello, I am new to non-linear growth modelling in R and I am trying to
reproduce an analysis that was done (successfully) in S-Plus.  

 

I have a simple non-linear growth model, with no nesting. I have attempted
to simplify the call as much as possible (by creating another grouped
object, instead of using subset= and compacting the fixed and random
expressions.)

 

This is a what the grouped data object looks like:

 

levelI.data[1:2,]

Grouped Data: GMAE ~ AGE | STUDYID

   STUDYID TIME            SCORE       INCURVES      MOST     FIRST      AGE

19    1005    1 ACTUAL (unaided) in JAMA curves Level I   Level I   49.11301

20    1005    2 ACTUAL (unaided) in JAMA curves Level I   Level I   56.53745

       GMFM GMFCS  GMAE      YRS

19 91.03394     1 74.16 4.092751

20 95.35018     1 84.05 4.711454

 

Here is the nlme model:

 

cp.grad<-deriv(~ (100/(1+exp(-L)))*(1-exp(-exp(logR)*x)), c("L", "logR"),
function(x=0:100,L,logR) NULL)

levelI.nlme<-nlme(GMAE~cp.grad(AGE,limit,lograte), 

            data=levelI.data, 

            fixed = limit+lograte~1, 

            random = limit+lograte~1, 

            start = c(2.0, -3.0))

 

I get a subscript out of bounds error  - which I am not finding very helpful
because I don't know where things are going wrong.

 

Bill Shipley posted a similar problem with nlme called with a self-starting
function - but here I don't use a self-starting function and I give the
starting values explicitly so I assume that this is not the same problem he
is having.

 

What am I doing wrong?  Any insights would be very much appreciated.

 

Kind Regards, Lisa Avery


	[[alternative HTML version deleted]]

