Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- how to use proc power to calculate power given alpha, hazard ratio and...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 01-23-2020 01:52 AM
(1383 views)

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

8 REPLIES 8

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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`

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi all,

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

Thanks!

Hao

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

**Available on demand!**

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

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.