PRIMEplus.SampleSize {PRIMEplus} | R Documentation |
Sample Size
Description
Compute the sample size for a given power
Usage
PRIMEplus.SampleSize(power=0.8, rand_ratio=0.5, effect_p=0.6, enroll_rate=380*0.25/6,
lambda1=0.117, HR=0.5, tau=12*5, t1=1, maxiter=100000, stopTol=1e-4,
alpha=0.05, num_rand=1000, nsim=10000, min.N=100, max.N=700,
tol.power=0.01, tol.N=1, print=1,
min.sample.size=50, min.n.event=5, min.per.trt=0.25)
Arguments
power |
The desired power. The default is 0.8. |
rand_ratio |
Allocation ratio |
effect_p |
Vector for proportion of responders in the treatment arm at baseline (see details) |
enroll_rate |
Enrollment rate in subjects per month |
lambda1 |
Baseline hazard in terms of months |
HR |
Vector of hazard ratios for responders against controls (see details) |
tau |
Total study duration |
t1 |
Delayed duration |
maxiter |
Maximum number of iterations in the EM algorithm. The default is 100000. |
stopTol |
Stopping tolerance in the EM algorithm. The default is 1e-4. |
alpha |
Significance level. The default is 0.05. |
num_rand |
Number of replications in the re-randomization test. The default is 1000. |
nsim |
Number of simulations in computing power (see Details). The default is 10000. |
min.N |
Lower bound for the sample size. The default is 100. |
max.N |
Upper bound for the sample size. The default is 700. |
tol.power |
Stopping tolerance for the power. The default is 0.01. |
tol.N |
Stopping tolerance for the sample size. The default is 1. |
print |
0 or 1 to print information. The default is 1. |
min.sample.size |
Minimum sample size. The default is 50. |
min.n.event |
Minimum number of events. The default is 5. |
min.per.trt |
Minimum proportion of controls and treated subjects. The default is 0.25. |
Details
The length and order of effect_p
must be the same as HR
. Both of these vectors
should contain information only for the groups of responders. For example, if there are
full responders and partial responders, then effect_p
and HR
would be vectors
of length two.
This uses a bisection method to estimate the sample size. At each iteration,
the estimated power power_est
is computed using PRIMEplus.Power
for a given sample size holding all other parameters fixed.
The algorithm terminates when abs(power - power_est) <= tol.power
or
when the length of the estimated interval containing the sample size is
less than or equal to tol.N
.
NOTE:
It is important to note that the power for a given sample size is estimated by
running a simulation. Thus, by setting a different seed, a different result may
be returned. Therefore, to ensure a more precise estimated sample size, set the
option nsim
to a large value and/or run this function several times by
setting different seeds and examine the distribution of returned sample sizes.
Value
A list containing the sample size and power.
Author(s)
Zhenzhen Xu <Zhenzhen.Xu@fda.hhs.gov>, Yongsoek Park <yongpark@pitt.edu> and Bin Zhu <bin.zhu@nih.gov>