SimulateSimonDsgnAdaptN: Simon's adaptive designs data simulation

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Simulates data from adaptive versions of Simon's optimal and minimax designs, propposed by Englert and Kieser (2012). Adaptation consists in recalculating the second stage sample size n2 in order to achieve a desired conditional power given the number of successes at first stage.

Usage

1
2
SimulateSimonDsgnAdaptN(replicates, designParam, newp1 = NA,
  condPwr = NA, restAlphaMet = 0, seed = NA, deleteOld = TRUE)

Arguments

replicates

Number of trials to be generated.

designParam

A dataframe containing Simon's optimal and minimax designs, as returned by the function CalculateSimonDsgn.

newp1

If NA (default) data are generated assuming the same response probability under alternative hypothesis, p1, used to get the designs (see CalculateSimonDsgn). One may provide different values of newp1 if there is interest in studying the effect of departure from the design's assumed p1.

condPwr

The desired conditional power. The default is 1-beta.

restAlphaMet

The method for spending the "rest alpha" (difference between nominal alpha level and actual alpha level for the given design).

  • 0: "rest alpha" is not used (default);

  • 1: "rest alpha" is spent proportionally;

  • 2: "rest alpha" is spent equally;

  • 3: "rest alpha" is spent only to the worst case scenario (minimal number of responses at the interim analysis so that the study can proceed to the second stage).

seed

Initial value (any integer) of random-number seed. It is useful for creating simulations that can be reproduced. The default is NA, meaning no reproducibility.

deleteOld

If TRUE (default) the sub-directories /OptimalAdapt/SimulatedTrials and /MinimaxAdapt/SimulatedTrials are deleted, if they exist, before simulation starts. The old data files are still replaced by the new ones even if deleteOld is set to FALSE, but some old files remain in cases where the previous replicates was greater that the current one.

Details

The simulated trials are stored in the sub-directories /OptimalAdapt/SimulatedTrials and /MinimaxAdapt/SimulatedTrials for optimal and minimax designs, repectively, under the current working directory. The sub-directories are automatically created. Individual trial data are stored in a CSV file named trial#, where # is the replicate number.

Value

The function is not intended to return an R object, instead it creates files (in CSV format) containing simulated trials data. See Details. It also saves in the current working directory the designParam argument (DesignParametersAdapt.csv).

Author(s)

Arsenio Nhacolo

References

Englert S., Kieser M. Adaptive designs for single-arm phase II trials in oncology. Pharm Stat, 2012, 11, 241-249.

See Also

CalculateSimonDsgn, getN2, SimulateSimonDsgn and AnalyzeSimonDsgnAdaptN.

Examples

1
2
d <- CalculateSimonDsgn(0.2, 0.4, 0.05, 0.1)
SimulateSimonDsgnAdaptN(100, d, seed = 1986)

arsenionhacolo/InferenceBEAGSD documentation built on May 9, 2019, 4:10 a.m.