BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
likestat
Calcite | Level 5
I have a question:

I would like to test the proportional assumption for our data.


At first, I used,
proc phreg data = pfsdays;
class trt;
model ept*eptcen(1) = trt / rl;
assess var = (trt) ph;
run;
I got : ERROR: Cannot assess the functional form of ATRSORT since it is not
a continuous explanatory variable.

Then I created a numeric var, trtpn, 0, 1 correspoding to two treatment
groups. No error.

The code I used is:

ods graphics on;
proc phreg data = pfsdays;
model ept*eptcen(1) = trtpn / rl;
assess var = (trtpn) ph;
run;
ods graphics off;

I got two plots for the assess statemetns, Cumulative Martingale function form,
and Standardized Score Process Plot.

I cannot copy the plot here. Sorry.
Before day 300, the plot is above 0, fluctuated lot, then after 300, it is still above 0, but almost flat.

My question is: since my trtpn only has two values, 0, 1, so I use it in the
assess statement is correct, or wrong? If it is correct, how to explain the
results? If it is not correct, how to use the “assess” statement to
test the ph assumption?

Thanks any one!!
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Since your variable is a binary or categorical you should include it in the CLASS statement. That's the essential difference between your two models.

To assess the proportional hazard assumption I usually use the

assess ph;

OR

assess ph resample;

line only, as most of my variables are categorical. This will produce the standardized score plots. If you specify resample as well it will give you a p value to help determine if your data violates the ph assumption. You can check the docs for more info on those options.

I don't know what it means to check the functional form of a variable :(.

HTH,
Reeza

View solution in original post

6 REPLIES 6
Reeza
Super User
Since your variable is a binary or categorical you should include it in the CLASS statement. That's the essential difference between your two models.

To assess the proportional hazard assumption I usually use the

assess ph;

OR

assess ph resample;

line only, as most of my variables are categorical. This will produce the standardized score plots. If you specify resample as well it will give you a p value to help determine if your data violates the ph assumption. You can check the docs for more info on those options.

I don't know what it means to check the functional form of a variable :(.

HTH,
Reeza
likestat
Calcite | Level 5
Hi Reeza:

Thanks a lot!! I just read you reply. It is very helpful.

Now I used:
ods graphics on;

proc phreg data = days;
class trt;
model pfsdays*cen(1) = trt / rl;
assess ph resample;
run;

ods graphics off;

trt = A, or B for two treatment arms.

I got the result for the test of PH assumption.

The treatment effect is not significant. But also, the p_value of the test of PH is also not significant.

Can I say PH is violated? I guess not.

I pasted the result below. It become not clear. So I bolded and underlined the p_value.

Thanks!!




Type 3 Tests

Wald
Effect DF Chi-Square Pr > ChiSq

TRT 1 0.0011 0.9730


Analysis of Maximum Likelihood Estimates

Parameter Standard Hazard Parameter DF Estimate Error Chi-Square Pr > ChiSq Ratio
TRT A 1 -0.00671 0.19816 0.0011 0.9730 0.993

Analysis of Maximum Likelihood Estimates

Parameter Label

TRT A Actual treatment code A


Supremum Test for Proportionals Hazards Assumption

Maximum
Absolute Pr >
Variable Value Replications Seed MaxAbsVal

TRT 0.7830 1000 707007001 0.4640
Reeza
Super User
Looks like there is no trt difference and the proportionality assumption is not violated.

If you have only one variable you can also verify your ph assumption using a proc lifetest and getting the log log plot. If the lines are parallel then your assumption is not violated.
likestat
Calcite | Level 5
Thanks Reeza!

I got the Log (-log(Surv)) too before also. For the earlier days, the two lines are very close with some touching together; later they seperate widely; however, at those days, maybe there are only a few patients left in the study. Probably, we cannot say the assumption is violated.

The trt is not significant from both proc lifetest and proc phreg; also I got hazard plot of trt from proc lifetest. They are very close in the early days with a few times of crossing.

So, if we report singles HR from the proc phreg output, does it make sense or not?

Thanks a lot!!
Reeza
Super User
If the difference between treatments isn't significant the confidence interval for your hazard ratio should include 1, so make sure to include the 95% confidence interval as well. Message was edited by: Reeza
likestat
Calcite | Level 5
> If the difference between treatments isn't
> significant the confidence interval for your hazard
> ratio should include 1, so make sure to include the
> 95% confidence interval as well.
>
> Message was edited by: Reeza

Hi Reeza:

Thanks a lot!

I feel, basically, I am clear now. I got the point. Since the trt is not significant, HR's confident interval should include 1. Our data does include 1, ( 0.674, 1.465).

Also, our survival curve, code is below.

proc lifetest data = days plots=( s ls lls h(bw = 15 kernel = e ) );
time pfsdays*cen(1);
strata trt;
run;

Test of Equality over Strata

Pr >
Test Chi-Square DF Chi-Square

Log-Rank 0.0449 1 0.8322
Wilcoxon 0.3067 1 0.5797
-2Log(LR) 0.1083 1 0.7421


It is not significant. The survival curve, till about day 120, trt 1 curve is above trt 2 curve with two times trt 1 curve down till touching together. After day 120, trt2 curve is above trt1 curve with a few times trt 2 down till touching together.

I would like to say from this survival curve, trt 1 is better at first, and trt 2 is better later. Is this opinion correct?

Thanks!!

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
  • 9020 views
  • 0 likes
  • 2 in conversation