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

Hi everyone,

 

I want to calculate a sample size to study predictive factors.

I don't understand why i don't get the same NTOTAL in these two procedures :

 

1) Procedure 1

proc power;
logistic
vardist("fp1") = binomial(0.1,1)
testpredictor = "fp1"
responseprob = 0.3
testoddsratio = 2.25
ntotal = .
power = 0.8;
run;

 

2) Procedure 2

proc power;
logistic
vardist("fp1") = binomial(0.1,1)
testpredictor = "fp1"
responseprob = 0.7
testoddsratio = 2.25
ntotal = .
power = 0.8;
run;

 

Could someone explain to me, please.

 

Have a nice day.

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

Your responseprob = values are different in the two programs, and that makes the resulting sample sizes to be different.

 

If you "reverse" the definition of "success", then you also need to "reverse" the odds ratio, that is, the new value would be testoddsratio=0.44444 (which is 1/2.25), then you would get consistent results.

 

Hope this helps,

Jill

View solution in original post

2 REPLIES 2
jiltao
SAS Super FREQ

Your responseprob = values are different in the two programs, and that makes the resulting sample sizes to be different.

 

If you "reverse" the definition of "success", then you also need to "reverse" the odds ratio, that is, the new value would be testoddsratio=0.44444 (which is 1/2.25), then you would get consistent results.

 

Hope this helps,

Jill

Elisa97
Fluorite | Level 6

Thank you very much!! Have a nice day.

 

Elisa

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 lock in 2025 pricing—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
  • 2 replies
  • 1142 views
  • 1 like
  • 2 in conversation