simulateCoverageDifferenceTwoProportions: Simulate the coverage of a savi confidence sequence for...

simulateCoverageDifferenceTwoProportionsR Documentation

Simulate the coverage of a savi confidence sequence for differences between proportions for a given distribution and savi design.

Description

Simulate the coverage of a savi confidence sequence for differences between proportions for a given distribution and savi design.

Usage

simulateCoverageDifferenceTwoProportions(
  successProbabilityA,
  trueDelta,
  saviDesign,
  precision = 100,
  M = 1000,
  numberForSeed = NA
)

Arguments

successProbabilityA

probability of observing a success in group A.

trueDelta

difference in probability between group A and B.

saviDesign

a savi test design for two proportions retrieved through designSaviTwoProportions().

precision

precision of the grid to search over for the confidence sequence bounds. Default 100.

M

number of simulations to carry out. Default 1000.

numberForSeed

number for seed to set, default NA.

Value

the proportion of simulations where the trueDelta was included in the confidence sequence.

Examples

balancedSaviDesign <- designSaviTwoProportions(na = 1,
                                               nb = 1,
                                               nBlocksPlan = 20)
simulateCoverageDifferenceTwoProportions(successProbabilityA = 0.2,
                                         trueDelta = 0,
                                         saviDesign = balancedSaviDesign,
                                         M = 100,
                                         precision = 20,
                                         numberForSeed = 1082021)

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