turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Sample Size Calculation for Cox (Proportional Haza...

Topic Options

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

Highlighted
# Sample Size Calculation for Cox (Proportional Hazards) Regression

Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thursday

I am having trouble understanding why the 'coxreg' option in proc power doesn't work for me. Everything I have read said to use that option to in order to determine the number of events needed, when I have an estimate for the HR and power that I want the study/analysis to have. Is it available anymore? If not, what other options are there in SAS to calculate this? I am using SAS 9.4 TRS Level 1M2. Windows Version 6.1.

```
proc power;
coxreg;
run;
proc power;
onesamplefreq;
run;
```

Obviously the code above is not complete, but in my program 'coxreg' from the first example is red (meaning it's not recognized, unlike the 'onesamplefreq' option below it).

Accepted Solutions

Solution

Thursday

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shakabra09

Thursday

Unfortunately SAS / STAT 13.2 doesn't have COXREG as an option.

If you have a valid maintenance license, upgrades are free.

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shakabra09

Thursday

program 'coxreg' from the first example is red (meaning it's not recognized, unlike the 'onesamplefreq' option below it).

That's not necessarily true. The editors just not smart enough sometimes.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

Thursday

From my log:

1 proc power;

NOTE: Writing HTML Body file: sashtml.htm

2 coxreg

------

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

I should have included this in my original post...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shakabra09

Thursday

What version of SAS/STAT do you have?

`proc product_status;run;`

Or how about the demo code:

```
proc power;
coxreg
hazardratio = 1.4
rsquare = 0.15
stddev = 1.2
ntotal = 80
eventprob = 0.8
power = .
;
run;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

Thursday

What version of SAS/STAT do you have?

`proc product_status;run;`

13.2

Or how about the demo code:

`proc power; coxreg hazardratio = 1.4 rsquare = 0.15 stddev = 1.2 ntotal = 80 eventprob = 0.8 power = . ; run;`

```
10 proc power;
11 coxreg
------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
12 hazardratio = 1.4
13 rsquare = 0.15
14 stddev = 1.2
15 ntotal = 80
16 eventprob = 0.8
17 power = .
18 ;
19 run;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shakabra09

Thursday

It looks like that is my problem, SAS/STAT 13.2 doesn't support coxreg. I need to make sure I use that User's Guide. Thank you!

Solution

Thursday

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shakabra09

Thursday

Unfortunately SAS / STAT 13.2 doesn't have COXREG as an option.

If you have a valid maintenance license, upgrades are free.