turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Estimation of growth model parameters for each ID?

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-29-2014 11:02 AM

**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

I used SAS9.1.3., could anyone please help me?

Best regards.

**Zana**

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-30-2014 09:50 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-30-2014 03:30 PM

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.**

**Please check my program and let me i have your idea.**

**Best regards**

Zana

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-31-2014 11:27 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-31-2014 01:13 PM

**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**

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-31-2014 01:25 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-31-2014 04:35 PM

**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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-02-2015 07:27 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-06-2015 04:31 AM

**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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-06-2015 01:58 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-06-2015 04:37 PM

**Thank you so much, really you are fabulous.**

**Thanks again.**

**Zana**

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-09-2015 02:45 AM

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**

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-09-2015 01:53 PM

That would be a very good approach.

Steve Denham