BookmarkSubscribeRSS Feed
jawon
Fluorite | Level 6

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?

3 REPLIES 3
SteveDenham
Jade | Level 19

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

jawon
Fluorite | Level 6

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;

      datalines;

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

;

run;

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?

SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1724 views
  • 0 likes
  • 2 in conversation