Dear all,
How are you?
I'd like to ask if it's possible to write out the equation from the proc transreg below?
Can the regression coefficients below be written as y=6.87157+3.65544male+...+0.47702score?
and be interpreted as one unit increase in x will increase y by 0.53355?
Thank you very much.
ods graphics on;
proc transreg data=rtm solve test nomiss plots=all;
model spline(y/ nknots=9)=opscore(male)
opscore(age18_19) opscore(age20_24) opscore(age25_34) opscore(age35_44) opscore(age45_54)
spline(x/ nknots=9) identity(score) / cl detail;
output out=trans predicted residuals mrc coefficients;
run;
ods graphics off;
proc print data=trans; where _TYPE_='M COEFFI'; run;
/*
obs _TYPE_ _NAME_ TIntercept Tmale Tage18_19 Tage20_24 Tage25_34 Tage35_44 Tage45_54 Tx Tscore
1325 M COEFFI y 6.87157 3.65544 6.04942 5.01395 4.95410 5.90719 3.10483 0.53355 0.47702 .
*/
Yes. That is how to read them (I am assuming each of the tage variables are coded 0 and 1).
If you have actual age, I would recommend using that, instead of the categorical variables for age.
Hi Peter.
Thanks for your reply.
I tried what you suggested by fitting spline to the continuous age variable instead.
I later examined the residuals of my spline regression but I'm not sure if the residual plot and the Q-Q plot indicate any severe heteroscedasticity and non-normality?
Perhaps you could shed some light me on this?
Thank you very much.
It does seem to exhibit some of each; whether that will be problematic is another question - I don't know of good tools for figuring out how great a violation relates to how problematic a regresssion
Thanks Peter for your response.
I'll go and explore a bit more.
Hi Peter.
How are you?
Let's not worry about the non-normality and heteroscedasticity for now.
Can I please ask you about my interpretation of the spline regression coefficients in the first post whether it is correct?
Thank you very much and have a good day.
Yes, you're right in your interpretation.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.