BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
NinaWestern
Obsidian | Level 7

Hi everyone,

 

I am trying to estimate a sample size using proc power; coxreg 

In order to estimate ntotal, I need to specify eventprob=

Where can I get this value from?

Here is the code:

proc power;
coxreg
sides=2
alpha=.05
hazardratio=.564
stddev=0.477
power = 0.8
ntotal= .;
run;

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

To meet your goals, I would suggest updating the HR at fixed points.

 

SteveDenham

View solution in original post

6 REPLIES 6
SteveDenham
Jade | Level 19

You get eventprob in one of two ways. If you have historical or analytical results available, you can use that value. If you don't, but do have some idea of the range where it might be, you can plug in a "row vector" of possible values, and PROC POWER will calculate ntotal for each of those values, given the other parameters.

 

SteveDenham

NinaWestern
Obsidian | Level 7
Thank you, @SteveDenham.

I know its simple, but just want to make sure I am using the right values from the historical data:

In my case, we have a control and treatment group where we assess the recidivism rate over time. After 12 months, in the control group, there is a 20% of recidivism (2/10 get arrested again), while in the treatment group it's 15% (1.5/10 get arrested).

At 18 months, these rates are higher (25% and 18%).

how do I calculate the eventprob from those values?

Thank you, I really appreciate your help!

SteveDenham
Jade | Level 19

I think you just plug in the value of interest.  Here is code, with the two control rates and the two treated rates you have:

 

proc power;
coxreg
sides=2
alpha=.05
hazardratio=.564
stddev=0.477
power = 0.8
eventprob = 0.15 0.18 0.2 0.25
ntotal= .;
run;

The only thing that bothers me is the hazardratio estimate, but if you are comfortable with that, this should work for you.

 

SteveDenham

 

NinaWestern
Obsidian | Level 7

@SteveDenham

 

Thank you!

The hazard ratio is taken from the Cox regression using the historical data set. So it is across all time points, B =-.574, HR = .564 (95% CIs: .233, 1.36), p = .202

 

The data collection started a while ago but is ongoing. Based on that data (current n=188), we are trying to figure out the final sample size to reach 80% power.  

Does this make sense?

 

Should the HR in the proc power syntax be recalculated at 12 months and 18 months, to correspond with the event rates? 

 

This is my first time doing this type of calculation.

 

 

 

 

 

 

 

 

 

SteveDenham
Jade | Level 19

To meet your goals, I would suggest updating the HR at fixed points.

 

SteveDenham

NinaWestern
Obsidian | Level 7
@SteveDenham, thank you!

I ran it as per your suggestions - it does male sense.
Appreciate all your help!

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 1103 views
  • 2 likes
  • 2 in conversation