simulateOptionalStoppingScenarioTwoProportions {safestats} | R Documentation |
Simulate an optional stopping scenario according to a safe design for two proportions
simulateOptionalStoppingScenarioTwoProportions(safeDesign, M, thetaA, thetaB)
safeDesign |
a 'safeDesign' object obtained through |
M |
integer, the number of data streams to sample. |
thetaA |
Bernoulli distribution parameter in group A |
thetaB |
Bernoulli distribution parameter in group B |
list with the simulation results of the safe test under optional stopping with the following components:
Proportion of sequences where H0 was rejected
Mean stopping time
Proportion of experiments stopped before nBlocksPlan was reached
Minimum stopping time
All achieved E values
All stopping times
Decisions on rejecting H0 for each M
Stopping times of experiments where H0 was rejected
balancedSafeDesign <- designSafeTwoProportions(na = 1,
nb = 1,
nBlocksPlan = 30)
optionalStoppingSimulationResult <- simulateOptionalStoppingScenarioTwoProportions(
safeDesign = balancedSafeDesign,
M = 1e2,
thetaA = 0.2,
thetaB = 0.5
)