Power and sample size for a binomial proportion using the cloglog parameterization.
1 2 3 
p.alt 
The alternative proportion in a onesample test. 
n 
The sample size in a onesample test. 
p 
The null proportion in a onesample test. Default is 0.5. 
power 
The desired power level. Default is 0.80. 
alpha 
The desired alpha level  probability of a Type I error. Default is 0.05. 
alternative 
Nature of alternative hypothesis. One of "two.sided", "greater", "less". 
exact.n 
logical; If 
recompute.power 
logical; If 
phi 
Dispersion parameter by which to inflate ( 
This function can be used to calculate sample size, power or minimum
detectable difference. It determines what to compute base on the
arguments provided. If p.alt
is given, but n
is not, then
sample size is computed. If p.alt
is given along with n
,
then the power is computed. If only n
is provided, the minimum
detectable difference is computed using the default power of 0.80.
A data.frame
containing the power, sample size and all of the
input which was used to perform the computations.
Sundar DoraiRaj (sdorairaj@gmail.com)
1 2 3  cloglog.sample.size(p.alt = 0.8)
cloglog.sample.size(n = 20)
cloglog.sample.size(n = 20, power = 0.9)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.