simulateOptionalStoppingScenarioTwoProportions {safestats}R Documentation

Simulate an optional stopping scenario according to a safe design for two proportions

Description

Simulate an optional stopping scenario according to a safe design for two proportions

Usage

simulateOptionalStoppingScenarioTwoProportions(safeDesign, M, thetaA, thetaB)

Arguments

safeDesign

a 'safeDesign' object obtained through designSafeTwoProportions().

M

integer, the number of data streams to sample.

thetaA

Bernoulli distribution parameter in group A

thetaB

Bernoulli distribution parameter in group B

Value

list with the simulation results of the safe test under optional stopping with the following components:

powerOptioStop

Proportion of sequences where H0 was rejected

nMean

Mean stopping time

probLessNDesign

Proportion of experiments stopped before nBlocksPlan was reached

lowN

Minimum stopping time

eValues

All achieved E values

allN

All stopping times

allSafeDecisions

Decisions on rejecting H0 for each M

allRejectedN

Stopping times of experiments where H0 was rejected

Examples

balancedSafeDesign <- designSafeTwoProportions(na = 1,
                                               nb = 1,
                                               nBlocksPlan = 30)
optionalStoppingSimulationResult <- simulateOptionalStoppingScenarioTwoProportions(
  safeDesign = balancedSafeDesign,
  M = 1e2,
  thetaA = 0.2,
  thetaB = 0.5
)

[Package safestats version 0.8.7 Index]