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?
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
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?
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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.