## Equation from Proc transreg

Regular Contributor
Posts: 234

# Equation from Proc transreg

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 .

*/

Frequent Contributor
Posts: 140

## Re: Equation from Proc transreg

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.

Regular Contributor
Posts: 234

## Re: Equation from Proc transreg

Hi Peter.

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.

Frequent Contributor
Posts: 140

## Re: Equation from Proc transreg

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

Regular Contributor
Posts: 234

## Re: Equation from Proc transreg

Thanks Peter for your response.

I'll go and explore a bit more.

Regular Contributor
Posts: 234

## Re: Equation from Proc transreg

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.

Frequent Contributor
Posts: 140

## Re: Equation from Proc transreg

Yes, you're right in your interpretation.

Discussion stats
• 6 replies
• 527 views
• 3 likes
• 2 in conversation