BookmarkSubscribeRSS Feed
TomHsiung
Pyrite | Level 9

Hello, guys

 

You suggestion is precious.

 

To estimate the sample size, we need a value of R^2. I don't know how do we get that R^2.

 

An example script is:

 

proc power;
   coxreg
      hazardratio = 1.6
      rsquare = 0.2
      stddev = 1.1
      power = 0.9
      eventstotal = .
   ;
run;

The definition of R^2 is:

 

Screenshot 2025-05-16 at 10.30.44 PM.png

3 REPLIES 3
Ksharp
Super User

I think it is just like R-Square of PROC REG and GLM .
r-square= 1 - uss(residual)/css(y) ;

https://support.sas.com/kb/60/162.html

SteveDenham
Jade | Level 19

One nice feature of PROC POWER is its ability to give power or sample size estimates for a variety of values of the various parameters. In this case, you may want to look at several values for Rsq, to see how sensitive sample size (or power) is to this value. If it turns out that the result is not too sensitive to changes in Rsq, then you can use the standard formula that @Ksharp gave. If it is otherwise, then you need to look at other estimators for Rsq that reduce bias.

 

SteveDenham

TomHsiung
Pyrite | Level 9
Thank you both @Ksharp and @SteveDenham I think I need to supplement my mathematical statistics basis before I can dig deeper into this issue.

Regards,

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 908 views
  • 0 likes
  • 3 in conversation