BookmarkSubscribeRSS Feed
Miracle
Barite | Level 11

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 .

*/

6 REPLIES 6
plf515
Lapis Lazuli | Level 10

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.

Miracle
Barite | Level 11

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.

residual plot.bmp

QQplot.bmp

plf515
Lapis Lazuli | Level 10

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

Miracle
Barite | Level 11

Thanks Peter for your response.

I'll go and explore a bit more.

Miracle
Barite | Level 11

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.

plf515
Lapis Lazuli | Level 10

Yes, you're right in your interpretation.

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
  • 6 replies
  • 1923 views
  • 3 likes
  • 2 in conversation