Programming the statistical procedures from SAS

Getting equation from proc transreg

Posts: 20

Getting equation from proc transreg

I have a small dataset of x and y values that create a downward trending curve. Using my vast statistical vocabulary, it looks like an "L". I'm trying to determine the equation for it. Looks like I can use proc transreg to fit the curve but how do I output the equation?

Respected Advisor
Posts: 2,655

Re: Getting equation from proc transreg

The output should contain estimates for the terms in the model.  That should provide the equation of interest.

However, if you use a semiparametric method like a spline, there isn't really a closed form equation that you can output.

Steve Denham

Posts: 20

Re: Getting equation from proc transreg

Sorry, this is new to me. Could use some handholding. So let's say I have this dataset:

data spon_prod;

      input months growth_rate;


6 1.8472

12 1.4303

18 1.2740

24 1.2078

30 1.1601

36 1.1353

42 1.1129

48 1.0988

54 1.0853

60 1.0778

66 1.0698

72 1.0645

78 1.0599

84 1.0555

90 1.0504

96 1.0463



So this is the "L" curve. Ultimately I want to project this curve out to 120 months, or 240 months, and beyond. How would I fit this curve and then estimate the "growth rate" at whatever point I want?

Respected Advisor
Posts: 2,655

Re: Getting equation from proc transreg

If your ultimate objective is to project out, then I would really urge you to look into the SAS/ETS procedures--ARIMA and MODEL may be appropriate.  Extrapolating beyond the range of existing data is extremely dangerous for ordinary least squares or maximum likelihood methods, such as those used by SAS/STAT procedures.  However, it can be done.  Append records to the end of your data, indicating months and with growth_rate set to missing.  For the two time points you mention, it would mean adding

120 .

240 .

to your existing dataset.  Now whatever procedure you use will fit based on complete data, but OUTPUT datasets can be set up to contain predicted values and confidence intervals.

I would do a search on this site for "hockey stick" and "PROC NLIN" as a way to fit this data.

Steve Denham

Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation