0
votes

I would like to derive individual growth rates from our growth model directly, similar to this OP and this OP.

I am working with a dataset that contains the age and weight (wt) measurements for ~2000 individuals in a population. Each individual is represented by a unique id number.

A sample of the data can be found here. Here is what the data looks like:

          id   age    wt
        1615     6      15  
        3468     32     61  
        1615     27     50  
        1615     60     145    
        6071     109    209  
        6071     125    207  
       10645     56     170   
       10645     118    200

I have developed a non-linear growth curve to model growth for this dataset (at the population level). It looks like this:

wt~ A*atan(k*age - t0) + m

which predicts weight (wt) for a given age and has modifiable parameters A, t0, and m. I have fit this model to the dataset at the population level using a nlme regression fit where I specified individual id as a random effect and used pdDiag to specify each parameter as uncorrelated.

The code for this looks like:

nlme.k = nlme(wt~ A*atan(k*age - t0) + m, 
data = df, 
fixed = A+k+t0+m~1, 
random = list(id = pdDiag(A+t0+k+m~1)), 
start = c(A = 99.31,k = 0.02667, t0 = 1.249, m = 103.8), #these values are what we are using at the population level # might need to be changed for individual models
na.action = na.omit,
control = nlmeControl(maxIter = 200, pnlsMaxIter = 10, msMaxIter = 100))

I have our population level growth model (nlme.k), but I would like to use it to derive/extract individual values for each growth constant.

How can I extract individual growth constants for each id using my population level growth model (nlme.k)?

Any suggestions would be appreciated!