selectivelyContinueZOrTTestData: Helper function to demonstrate the selective continuation of...

View source: R/vignetteHelpers.R

selectivelyContinueZOrTTestDataR Documentation

Helper function to demonstrate the selective continuation of paired z-tests

Description

Helper function to demonstrate the selective continuation of paired z-tests

Usage

selectivelyContinueZOrTTestData(
  designObj,
  deltaTrue = NULL,
  testName = c("Z-Test", "T-Test"),
  n1New,
  muGlobal,
  sigma,
  meanDiffTrue = NULL,
  nSim = 1000L,
  eValuesOld,
  eOverOld,
  trackCrossingOld,
  firstPassageTimeOld,
  eStoppedOld,
  seed = NULL
)

Arguments

designObj

an object obtained from designSaviZ().

deltaTrue

numeric, the value of the true standardised effect size (test-relevant parameter). This argument is used by designSaviT() with deltaTrue <- deltaMin

testName

character string either "Z-Test" or "T-Test".

n1New

Number of samples in the follow-up study

muGlobal

numeric, population grand mean

sigma

numeric > 0 representing the assumed population standard deviation used to scale the data.

meanDiffTrue

numeric, data governing mean difference used for simulations. Default meanDiffTrue=meanDiffMin.

nSim

integer > 0, the number of simulations needed to compute power or the number of samples paths for the savi z test under continuous monitoring.

eValuesOld

Matrix of eValues of the previous studies with nSim number of rows

eOverOld

Vector of 0s and 1s, where 1 indicates that

trackCrossingOld

Vector of same number of columns as eValuesOld providing the number of studies that got rejected at the indeced time

firstPassageTimeOld

Vector indicating the first passage time. If Inf, then not yet passed the threshold of 1/alpha

eStoppedOld

The stopped e-value either at the time it crosses the threshold, or at the previous nPlan

seed

integer, seed number.

Value

a list with the new e-values amongst other


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