computeMinEsBatchSaviT: Computes the smallest detectable deltaMin with power...

View source: R/tTest.R

computeMinEsBatchSaviTR Documentation

Computes the smallest detectable deltaMin with power probability, for the provided sample size

Description

Computes the smallest detectable deltaMin with power probability, for the provided sample size

Usage

computeMinEsBatchSaviT(
  nPlan,
  alpha = 0.05,
  power = 0.8,
  alternative = c("twoSided", "greater", "less"),
  testType = c("oneSample", "paired", "twoSample"),
  parameter = NULL,
  beta = NULL,
  eType = c("mom", "eGauss", "imom", "eCauchy", "grow", "lai"),
  lowEsTrue = 0.01,
  highEsTrue = 3,
  ...
)

Arguments

nPlan

optional numeric vector of length at most 2, see scenario 2 and 3 above.

alpha

numeric in (0, 1) that specifies the tolerable type I error and the null rejection rule e >= 1/alpha.

power

numeric in (0, 1) that specifies the desired power, that is, the targetted chance to stop in favour of the alternative over the null hypothesis, when the alternative holds true. Note that prior to version 0.8.8 power <- 1-beta. The "beta" argument does not need to be specified anymore.

alternative

a character string specifying the alternative hypothesis. Must be one of "twoSided" (default), "greater" or "less".

testType

either one of "oneSample", "paired", "twoSample".

parameter

numeric, an optional savi test defining parameter. Default set to NULL. and adapts to meanDiffMin and eType, see matchEParameterWith for details.

beta

numerical in (0,1). Old parameter now replaced by the power parameter

eType

character one of "mom", "grow", "eGauss", and "eCauchy". "mom" is default and uses a non-local moment prior with bump(s) at meanDiffMin, "grow" uses point prior(s) at meanDiffMin, "eGauss" a zero-centred normal prior, "eCauchy" a zero centred Cauchy prior.

lowEsTrue

numeric, lower bound for the candidate set of the targeted minimal clinically relevant effect size for scenario 3.a.

highEsTrue

numeric, upper bound for the candidate set of the targeted minimal clinically relevant effect size for scenario 3.a.

...

further arguments to be passed to or from methods, but mainly to perform do.calls.

Value

numeric > 0 that represents the minimal detectable effect size

References

Grünwald, P. D., de Heide, R., & Koolen, W. (2024). Safe testing. Journal of the Royal Statistical Society. Series B (Methodological), 86(5), 1091-1128. (With discussions), https://doi.org/10.1093/jrsssb/qkae011. Ly, A, Boehm, Grünwald, P. D., Ramdas, A., & van Ravenzwaaij, D. (2024). Safe Anytime-Valid Inference: Practical maximally flexible sampling designs for experiments based on e-values. PsyArXiv Preprint, https://doi.org/10.31234/osf.io/h5vae.

Examples

computeMinEsBatchSaviT(27)

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