BookmarkSubscribeRSS Feed
jlynch
Calcite | Level 5

 

Proc Transreg looks like a powerful tool but it seems impossible to figure out the estimated model. From the SAS example I added "DETAIL" but only get knots and coefficients and can't relate them back to the transformation which I assume is cubic by default. The example below has 3 knots and therefore 4 cubic equations i.e. 12 coefficients plus an intercept but the output shows 7 coefficients. What am I doing wrong? is there a paper on this someplace? thanks for any help you can give. Joe.

 

 

 

title2 'A Cubic Spline Fit with Knots at X=5, 10, 15';

 

proc transreg detail data=a;

model identity(y) = spline(x / knots=5 10 15);

output out=trans coefficients;

proc print;

run;

 

 

1 REPLY 1
SteveDenham
Jade | Level 19

Try using BSPLINE and PSPLINE to get the coefficients.  BSPLINE should give what you need for the basis, realizing that SPLINE forms a linear combination of the columns of this basis.  PSPLINE is piecewise polynomial, and from your description, that may be what you are expecting, so it is probably worth exploring that option as well.  Good luck, and please share what you find back here.

 

Steve Denham

sas-innovate-2024.png

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.

 

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
  • 1 reply
  • 1442 views
  • 0 likes
  • 2 in conversation