# We are interested in designs with power at least 0.75 when exact size
# 0.025 and delta=0.20. Therefore, you would need to have downloaded
# LIB.a025.d20 using fetch(0.015,0.20). The example below instead uses
# the toy data that comes with the package. The baseline probability is
# assumed to be between 0.3 and 0.5.
rdata_file = system.file('files', 'LIB.a025.d20.Rdata', package = 'exact.n')
load(rdata_file)
#' main.function(.025,0.20,p0=c(0.3,0.5),beta=0.75,plt=TRUE)
# The value of the function is the minimum value of n1 for a range
# of values of n0. The sample size ratio is limited to 5 by default.
Run the code above in your browser using DataLab