BookmarkSubscribeRSS Feed
fengyuwuzu
Pyrite | Level 9

In survival analysis, given alpha, hazard ratio and number of events, assuming no Interim Analysis, how to calculate the power?

8 REPLIES 8
Rick_SAS
SAS Super FREQ

I believe you can use the COXREG statement in PROC POWER to get the power.

 

proc power;
   coxreg
      alpha = 0.1
      hazardratio = 1.4
      stddev = 1.0
      ntotal = 80 to 120 by 10
      eventprob = 0.8
      power = .
   ;
run;
fengyuwuzu
Pyrite | Level 9

Thank you very much Rick. I will look into it.

 

I just did it in R, using the following code

> z<-0.5*sqrt(n)*log(1/hr)-qnorm(1-alpha/2)
> power<-pnorm(z)

 

Rick_SAS
SAS Super FREQ

If you want to use an explicit formula, you can run the DATA step or PROC IML to get the same results as R:

 

data Power;
n = 20;
hr=0.3;
alpha=0.05;

z = 0.5*sqrt(n)*log(1/hr)-quantile("Normal", 1-alpha/2);
power = cdf("Normal", z);
run;

proc print; run;
fengyuwuzu
Pyrite | Level 9

Thank you very much Rick for providing code for this option.

 

I have a question on stddev in proc power with coxreg: how do I decide what number for stddev to use? 

stddev = 1.0

 

Rick_SAS
SAS Super FREQ

The parameters in the equation are usually based on pilot studies, previous research, or your best guess.  

haoduonge
Quartz | Level 8

Hi all,

A follow-up question to the [proc power]: can it integrate correlation coefficient in multilevel data?

Thanks!

Hao

TomHsiung
Pyrite | Level 9
Hello, Rick. I am not sure about the parameter stddev. Is it the standard error of a coefficient estimate from a PROC PHREG procedure, or something different? Thanks.
John_Castelloe
SAS Employee

The STDDEV= option in the COXREG statement is the assumed standard deviation of the predictor being tested---that is, your best guess of the true standard deviation of this predictor's sampling distribution under the same conditions as expected in the study you're planning. This isn't the same as the standard error of a coefficient estimate, just a simple property of the predictor variable itself as it would be sampled (or perhaps taking on values that you control yourself) in your planned study.

 

I'd also like to point out that the original question in this thread didn't specify what kind of data analysis is being planned, and it could just as easily pertain to the TWOSAMPLESURVIVAL statement in PROC POWER if you're planning a logrank test rather than a Cox proportional hazards regression. These are two scenarios in which PROC POWER supports the calculation of power for a survival analysis given alpha, hazard ratio, and number of events.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 8 replies
  • 2006 views
  • 4 likes
  • 5 in conversation