SD.sim {esDesign} | R Documentation |
The SD.sim()
is used to implement the simulation studies
of the standard design.
SD.sim(N, rho, alpha, beta, theta, theta0, sigma0, nSim, Seed)
N |
The total sample size required |
rho |
The proportion of subgroup 1 |
alpha |
The overall Type I error rate |
beta |
The |
theta |
The sizes of treatment effects for subgroups 1 and 2 in experimental arm |
theta0 |
The size of treatment effect for the control arm |
sigma0 |
The variance of the treatment effect |
nSim |
The number of simulated studies |
Seed |
The random seed |
A list contains,
nTotal the total sample used
The power of the specified trial. Here, the power is defined as the probability of rejecting the null hypothesis.
N <- 620
rho <- 0.5
alpha <- 0.05
beta <- 0.2
theta <- c(0.2,0.0)
theta0 <- 0
sigma0 <- 1
nSim <- 1000
Seed <- 6
SD.sim(N = N, rho = rho,
alpha = alpha, beta = beta, theta = theta, theta0 = theta0,
sigma0 = sigma0, nSim = nSim, Seed = Seed)