Help using Base SAS procedures

Growth Curve Analysis in SAS.

Reply
N/A
Posts: 0

Growth Curve Analysis in SAS.

I have a table that looks like this :

an id duration wt
7401-2001 0 129
7401-2001 167 540
7401-2001 198 652
7401-2001 224 680
7401-2001 246 715
7401-2002 0 94
7401-2002 133 416
7401-2002 169 556
7401-2002 203 644
7401-2002 226 700
7401-2002 247 723

and so on.

The 'anid' is a categorical variable. The goal is to calculate the slope for each anid treating duration as X and weight as Y. That is, a linear regression for each anid.

There are 2000 data rows and 500 different anids. I ran a GLM code on it but this gives me the same slope for each anid , with different intercepts.

I specifically require different slopes for different anids for further growth curve analysis. How to go about it? Please help.
Trusted Advisor
Posts: 2,113

Re: Growth Curve Analysis in SAS.

Fit a linear model within anid and then output the parameters.

e.g.

PROC GLM;
BY anid;
MODEL wt=duration;

You can output the slope an intercept with either ODS or an OUTPUT statement. The classical growth curve analysis (Wishert), requires the same time intervals (number and placement) so you can put all the wt's on the left hand side of the model and fit the curve within the times. IF you have that situation (you don't), this method is algebraically equivalent.


Message was edited by: Doc@Duke
N/A
Posts: 0

Re: Growth Curve Analysis in SAS.

Thanks for the reply. It worked great. I have worked on logistic models before, its my first tryst with ODS output.

I am trying to get the output into excel. ODS gives a lot of options. But each of them has a lot of unwanted result. The final excel table I am looking to compile has only 3 columns:
an id, slope, intercept

Thats it. Anyway I can just extract slope and intercept only from the output and chuck the other inferences which I do not need at the moment?

With 4 other files like this, I am looking at a formatting nightmare otherwise!!

Thanks again.
Ask a Question
Discussion stats
  • 2 replies
  • 115 views
  • 0 likes
  • 2 in conversation