Programming the statistical procedures from SAS

Equation from Proc transreg

Posts: 1

Equation from Proc transreg


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;




Respected Advisor
Posts: 2,655

Re: Equation from Proc transreg

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

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation