[R] Binomial Power/Sample Size
bacollier at ag.tamu.edu
Thu Oct 18 17:18:27 CEST 2007
I have been digging around in the help files and found bsamsize in
Hmisc, but I am wondering if i am using it right.
So, here is the question: given a binomial response (success/failure)
for 2 groups (treatment/control) and I want to estimate the necessary
sample size (n) to determine if the magnitude of the difference between
treatments and controls is a 25% increase in success probability.
Pilot data indicated that treatment success was ~0.32, control success
~0.09. So, using bsamsize (code below), I am interested in determining
what sample size (n) is needed such that I can detect a 25% change in
success between treatments/controls.
I tried this but I can't shake the feeling I am doing something wrong,
> power_b<-bsamsize(.25, .0, fraction =0.5, alpha=0.10, power=0.80)
> power_b<-as.data.frame(round(power_b, digits=1))
round(power_b, digits = 1)
Any suggestions on approaches, places I should have looked would be helpful,
Texas A&M University
system i386, mingw32
svn rev 43063
version.string R version 2.6.0 (2007-10-03)
More information about the R-help