View source: R/getSimulationResults.R
getSimulationResults | R Documentation |
Simulate the rejection probability for a given design and alternative.
getSimulationResults(
design,
maxNumberOfIterations = 10000,
alternative,
seed = NULL
)
design |
An object of class |
maxNumberOfIterations |
Number of trials to be simulated. |
alternative |
Assumed relative effect size. |
seed |
An optional seed for reproducibility. |
Simulates the probabilities of overall rejection as well as early futility and early efficacy for the provided scenario and design. This is done by generating random normally distributed test statistics and calculating their p-values.
An object of class SimulationResultsOptimalConditionalError
containing the simulation results.
getDesignOptimalConditionalErrorFunction()
, getOverallPower()
design <- getDesignOptimalConditionalErrorFunction(
alpha = 0.025, alpha1 = 0.001, alpha0 = 0.5, delta1 = 0.25,
useInterimEstimate = FALSE,
conditionalPower = 0.9, likelihoodRatioDistribution = "maxlr",
firstStageInformation = 10
)
# Simulate under the null hypothesis and for a mean difference of 0.5
getSimulationResults(
design = design, alternative = c(0, 0.5)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.