View source: R/Solve.beta.given.power.R
| Solve.beta.given.power | R Documentation |
For each design scenario in params, this function solves for the treatment effect coefficient beta.trt that achieves the
desired power using an iterative Monte Carlo calibration procedure. For scenarios labeled TypeI, the function sets beta.trt = 0.
For scenarios labeled Power, it repeatedly simulates two-sample composites data, estimates calibration quantities (a power constant and
variance) using either the generalized log-rank ("LR") or generalized-t ("GT") approach, updtaes beta.trt using
find.beta.trt(), and iterates until convergence within tol.
Solve.beta.given.power(
nsim = 1000,
params,
estimator,
tol = 0.001,
seed = NULL
)
nsim |
Integer giving the number of Monte Carlo replicates used for each iteration. Default is |
params |
A data frame where each rows defines a simulation/design scenario. Must include a column |
estimator |
Character string specifying which calibration method to use:
|
tol |
Positive numeric value giving the convergence tolerance for the
fixed-point iteration in |
seed |
Seed for reproducibility. |
A data.frame with the same rows as params and an additional
column beta.trt containing the solved treatment effect coefficient.
For Type == "TypeI", beta.trt is set to 0. For
Type == "Power", beta.trt is the converged solution from the
Monte Carlo calibration procedure.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.