BookmarkSubscribeRSS Feed
ZC
Calcite | Level 5 ZC
Calcite | Level 5

Hello,

I am confused about PROC POWER logistic. For example, I am examine the association between smoking and cardiovascular disease. I have the following data.

Smoking

Cardiovascular disease

Total

No

Yes

No

80

50

130

Yes

20

100

120

Total

100

150

250

I would like to use below the syntax:

PROC POWER;

      LOGISTIC

      vardist("smoking") = binomial (p,n)

      testpredictor = "smoking"

      responseprob = 0.60               

      testoddsratio = 1.5

      ntotal = 250

      power = .;

run;


In SAS support, it says "

BINOMIAL (p, n)

is a binomial distribution with probability of success and number of independent Bernoulli trials . The value of must be greater than 0 and less than 1, and must be an integer greater than 0. "

What should the p and n be in this example?

Thanks!

3 REPLIES 3
SteveDenham
Jade | Level 19

There are a couple of ways to go here, I think. Pick one of the two categories as the reference category.  For instance, if it is the SMOKING=NO category, the values would be p=50/130 and n would be 130.  Another would be to use the overall proportions, so that p=150/250=0.6 and n=250.

This is untested, but since PROC POWER runs rapidly, I would start here and see what the results look like.

Steve Denham

ZC
Calcite | Level 5 ZC
Calcite | Level 5

Thanks for your response.

Since 250 and 0.6 is already used in the syntax, we may not want to repeat the information in the binomial (p ,n) option.

Run the syntax with p = 50/130 and n = 130, power is >0.999.

Because binomial is the distribution of smoking (exposure here), run the syntax with p = 120/250, n = 250, power is >0.999.

However, run the following syntax, obtain a power of 0.263:

proc power; 

      twosamplefreq test=lrchi

         oddsratio =1.5

         refproportion = 0.2  

         groupns = (100 150)    

         power = .;

  run;

Theoretically, the LOGISTIC option and the TWOSAMPLEFREQ option in the PROC POWER should be equivalent. Not sure why the results are inconsistent!!!

SteveDenham
Jade | Level 19

Yes, but the OR in this data is 8.  Plugging that into the twosamplefreq gives power>0.999, so I would guess that the two are returning roughly the same thing (although the twosamplefreq is probably comparing to an OR of 1, rather than the testoddsratio of 1.5).

So, I think this design probably does have >.999 power to detect a difference in the OR of 8 vs 1.  Does that make sense?

To me, the next logical thing to do is to turn it inside-out, and calculate sample sizes for given OR, and I get some really weird results (N=15 for 80% power) but I think that might be for a unit change in the predictor, so I shifted to a standard deviation change (DEFAULTUNIT = SD), and now I get approximately 83% power to detect a shift from 1.5, or an N of 230 for 80% power.  I have to admit that I don't have a gut feel for sample sizes in logistic regression like I do for two sample comparisons, but this appears reasonable based on everything else here.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1731 views
  • 0 likes
  • 2 in conversation