Programming the statistical procedures from SAS

Sample Size Calculation for Cox (Proportional Hazards) Regression

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Sample Size Calculation for Cox (Proportional Hazards) Regression

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
Highlighted
Solution
Thursday
Super User
Posts: 20,222

Re: Sample Size Calculation for Cox (Proportional Hazards) Regression

Posted in reply to shakabra09

http://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_power_toc.ht...

 

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

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

View solution in original post


All Replies
Super User
Posts: 20,222

Re: Sample Size Calculation for Cox (Proportional Hazards) Regression

Posted in reply to shakabra09

 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. 

New Contributor
Posts: 4

Re: Sample Size Calculation for Cox (Proportional Hazards) Regression

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...

Super User
Posts: 20,222

Re: Sample Size Calculation for Cox (Proportional Hazards) Regression

Posted in reply to shakabra09

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;
New Contributor
Posts: 4

Re: Sample Size Calculation for Cox (Proportional Hazards) Regression



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;
New Contributor
Posts: 4

Re: Sample Size Calculation for Cox (Proportional Hazards) Regression

Posted in reply to shakabra09

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!

Highlighted
Solution
Thursday
Super User
Posts: 20,222

Re: Sample Size Calculation for Cox (Proportional Hazards) Regression

Posted in reply to shakabra09

http://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_power_toc.ht...

 

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

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 129 views
  • 1 like
  • 2 in conversation