BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
kc
Quartz | Level 8 kc
Quartz | Level 8

Hello,

 

It's straight forward to see how the HR's are calculated using the coefficients displayed in the HR table, but, I am trying to figure out how the coefficients are determined (especially the one highlighted in blue below) when using restricted cubic splines in calculating the HR's. A mathematical notation/equation using the ML estimates below when I=0.3 would be great. Or, if someone can point me in the direction of how the SAS output correlates with the math behind it, that would be great!

 

1. Variable I has a range (0.05 - 0.729)

2. Treatments A and B (2 groups)

3. using 3 equally spaced knots

 

/*Code*/

proc phreg data = dataset outest=RegParms;

effect I_RCS = spline(I / basis=tpf(noint) NATURALCUBIC details knotmethod=equal(3));

class Treatment(ref='B') Gender(ref='Female');

model T*Status(0, 2, 3) = I_RCS Treatment I_RCS*Treatment Gender Age Score1 Score2 / rl;

hazardratio Treatment / at(I=0.3 0.6) e;

run;

 

/*SAS Output*/

Knots for Spline Effect
I_RCS

Knot Number

Frailty

1

0.22297

2

0.39189

3

0.56081

 

Basis Details for Spline Effect
I_RCS

Column

Power

Break Knot

1

1

 

2

3

0.22297

 

Analysis of Maximum Likelihood Estimates

Parameter

 

 

DF

Parameter
Estimate

Standard
Error

Chi-Square

Pr > ChiSq

Hazard
Ratio

95% Hazard Ratio Confidence
Limits

Label

I_RCS

1

 

1

-1.34409

1.86171

0.5212

0.4703

.

.

.

I_RCS 1

I_RCS

2

 

1

16.14923

7.64104

4.4668

0.0346

.

.

.

I_RCS 2

Treatment

A

 

1

-1.80983

0.93087

3.7801

0.0519

.

.

.

Treatment Group A

I_RCS*Treatment

1

A

1

3.47685

3.29380

1.1142

0.2912

.

.

.

I_RCS 1 * Treatment Group A

I_RCS*Treatment

2

A

1

-15.76844

14.59523

1.1672

0.2800

.

.

.

I_RCS 2 * Treatment Group A

Gender

Male

 

1

0.12607

0.23512

0.2875

0.5918

1.134

0.716

1.798

Gender Male

Age

 

 

1

0.01625

0.01025

2.5147

0.1128

1.016

0.996

1.037

Age

Score1

 

 

1

0.01209

0.00804

2.2624

0.1325

1.012

0.996

1.028

Score1

Score2

 

 

1

-0.0004364

0.00613

0.0051

0.9432

1.000

0.988

1.012

Score2

 

 

Hazard Ratios for Treatment Group

Description

I_RCS1 Coefficient

I_RCS2 Coefficient

TrtA Coefficient

I_RCS1TrtA Coefficient

I_RCS2TrtA Coefficient

GENDERMale Coefficient

Age Coefficient

Score1 Coefficient

Score2 Coefficient

Point Estimate

95% Wald Confidence Limits

Trt A vs B At I=0.3

0

0

1.000000

0.300000

0.001353

0

0

0

0

0.455

0.280

0.739

Trt A vs B At I=0.6

0

0

1.000000

0.600000

0.105460

0

0

0

0

0.250

0.057

1.088

 

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
kc
Quartz | Level 8 kc
Quartz | Level 8

Yes. Unfortunately, the examples don't cover restricted cubic splines and how the coefficients in this specific scenario are calculated.

StatDave
SAS Super FREQ

The last section of this note might help to answer your question. This note might also be useful.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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