simulateOptionalStoppingScenarioTwoProportions: Simulate an optional stopping scenario according to a savi...

simulateOptionalStoppingScenarioTwoProportionsR Documentation

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

Description

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

Usage

simulateOptionalStoppingScenarioTwoProportions(saviDesign, M, thetaA, thetaB)

Arguments

saviDesign

a 'saviDesign' object obtained through designSaviTwoProportions().

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 savi 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

allSaviDecisions

Decisions on rejecting H0 for each M

allRejectedN

Stopping times of experiments where H0 was rejected

Examples

balancedSaviDesign <- designSaviTwoProportions(na = 1,
                                               nb = 1,
                                               nBlocksPlan = 30)
optionalStoppingSimulationResult <- simulateOptionalStoppingScenarioTwoProportions(
  saviDesign = balancedSaviDesign,
  M = 1e2,
  thetaA = 0.2,
  thetaB = 0.5
)

safestats documentation built on Sept. 6, 2026, 1:06 a.m.