BookmarkSubscribeRSS Feed
TomHsiung
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10
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,

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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