## Estimation of growth model parameters for each ID?

Frequent Contributor
Posts: 81

# Estimation of growth model parameters for each ID?

Merry Christmas!

Dear all,

I have a data set like this;

ID Sex Age Weight

1    F    10      20

1    F    22      60

2    M    9       15

2    M   18      54

How can i estimate parameters (by Nlmixed procedure) of the growth models (e.g, Brody function) for each ID in different ages?

The Brody function is:

y=a[1- {b*exp(-k*t)}]+e

y=observation (Weight)

exp=natural logarithms

t=Age

e= Residual

Best regards.

Zana

Posts: 2,655

## Re: Estimation of growth model parameters for each ID?

One method that should work is to add a BY statement to PROC NLMIXED.  An example is BY ID;.  Be sure to sort the data by ID in a PROC SORT first.

Steve Denham

Frequent Contributor
Posts: 81

## Re: Estimation of growth model parameters for each ID?

Thanks dear Steve,

I try by this:

data have;

input id sex\$ age weight;

cards;

1    F    10      20

1    F    22      60

2    M    9       15

2    M   18      54

;

proc nlmixed data=have;

by id;

parms a=60 b=5 k=0.5 s2e=1 s2u=10;

ex=exp(-k*age);

num=(a*(1-(b*ex)))+u;

model weight~normal(num,s2e);

random u ~ normal(0,s2u) subject=id;

predict num out=output_fixed;

run;

Is it true (please assume weight has a normal distribution)? However, when i run this program i can't found any parameters in the output file (output_fixed). I need a program that estimate all parameters (A, B & K) for each ID in each age.

Best regards

Zana

Posts: 2,655

## Re: Estimation of growth model parameters for each ID?

One big problem here--you are trying to fit a three parameter model with only two points.  It cannot be done.

Your program will also run into the problem of single subjects to estimate the random effect.

I believe you need to remove the BY ID statement to get the random effect to properly be applied.

NOTE WELL: You cannot get the parameters estimated separately for each ID if you consider ID to be the subject of a random effect. What you are estimating in NLMIXED are population parameters, where the population is that represented by the subjects measured.

If you wish to get these three parameters for each ID, I suggest that there be at least 4 ages for each ID.  You should also consider shifting to PROC NLIN, and fitting as follows:

proc nlin data=have;

by id;

parms a=60 b=5 k=0.5 ;

ex=exp(-k*age);

num=(a*(1-(b*ex)));

model weight=num;

output out=output_fixed/parms=(a b k); /* You may have to try different versions here, with commas for instance */

run;

What is absolutely key though is having more datapoints than parameters in the model.

Steve Denham

Frequent Contributor
Posts: 81

## Re: Estimation of growth model parameters for each ID?

Thanks a lot for your reply! Can i have a reliable scientific source for this key (having more datapoints than parameters in the model)?

Dear Steve i have a more question, is there a way to estimation of each parameters for each ID in different age (by Nlmixed, NLIN or each other procedure)?

Best regards,

Zana

Posts: 2,655

## Re: Estimation of growth model parameters for each ID?

Zana,

Any basic statistics text on regression will point out that you must have more data points than parameters you are estimating.  An excellent book would be Applied Regression Analysis, 2nd ed. by Draper and Smith, or REGRESSION MODELING STRATEGIES with Applications to Linear Models, Logistic Regression, and Survival Analysis by FE Harrell.  For a strictly non-linear approach, try Nonlinear Statistical Models by Ron Gallant.

So on to your final question--with only one point per ID per age, how could you possibly fit a model of any sort?  There are an infinite number of triples (a,b,K) that will yield a single value.

Steve Denham

Frequent Contributor
Posts: 81

## Re: Estimation of growth model parameters for each ID?

Data points per each ID?

Is't critical?

If i could understand you, there is no any way to estimate parameters for each age. Is it true?

Best regards

Zana

Posts: 2,655

## Re: Estimation of growth model parameters for each ID?

That is true.  Your function predicts weight from age.  If age does not vary, then the function cannot be applied.

I really recommend that you look over the references I provided so that you can firm up your knowledge of regression.

Steve Denham

Frequent Contributor
Posts: 81

## Re: Estimation of growth model parameters for each ID?

Dear Steve, thank you so much. I try study your references.

I have a more question: i should used a random effect in all growth models (e.g., Brody, Gompertz, Logistic, Richards & ...). I can't found this effect (random effect symbol) in each of these growth models. Do you have any idea or suitable reference about this?

Thanks again

Zana

Posts: 2,655

## Re: Estimation of growth model parameters for each ID?

Zana,

That is an interesting and complicated question.  It depends on which parameters in the given growth model you believe come from a distribution typified by the subjects measured, and which other parameters are to be considered fixed for all members of the population.  For an example, check out the Getting Started example in PROC NLMIXED where a logistic growth curve is fit.  Parameter b1 is assumed to come from a distribution with mean = 190 and variance = 1000 (starting assumption), while parameters b2 and b3 are assumed to be fixed across all members.  The short answer is that the researcher has to decide.

Steve Denham

Frequent Contributor
Posts: 81

## Re: Estimation of growth model parameters for each ID?

Thank you so much, really you are fabulous.

Thanks again.

Zana

Frequent Contributor
Posts: 81

## Re: Estimation of growth model parameters for each ID?

Dear Steve, sorry for wasting your time.

Please assume for our data the parameter A is more different between subjects. So, can i change the above function as fallows?

proc nlmixed data=have;

parms a=60 b=5 k=0.5 s2e=1 s2u=10;

ex=exp(-k*age);

num=((a+u)*(1-(b*ex)));

model weight~normal(num,s2e);

random u ~ normal(0,s2u) subject=id;

predict num out=output_fixed;

run;

Zana