| safeZTestStat | R Documentation |
Computes e-values using the z-statistic and the sample sizes based on the test defining parameter phiS.
Evidence for practical equivalence requires the e-value to be small, i.e. smaller than alphaRelevance. If the alternative holds true, i.e. meanDiffTrue >= relevanceSize, then there is no more than alphaRelevance probability of ever seeing eRelevance <= alphaRelevance.
saviZTestStat(
z,
n1,
n2 = NULL,
parameter,
alternative = c("twoSided", "less", "greater"),
paired = FALSE,
sigma = 1,
eType = c("mom", "eGauss", "imom", "eCauchy", "grow"),
...
)
saviRelevanceZStat(
z,
n1,
n2 = NULL,
parameter = NULL,
alternative = c("twoSided", "less", "greater"),
paired = FALSE,
sigma = 1,
eType = "grow",
relevanceSize = NULL,
...
)
z |
numeric that represents the observed z-statistic. |
n1 |
integer that represents the size in a one-sample Z-test, (n2= |
n2 |
an optional integer that specifies the size of the second sample. If it's left unspecified, thus,
|
parameter |
numeric > 0, the savi test defining parameter,
see |
alternative |
a character string specifying the alternative hypothesis. Must be one of "twoSided" (default), "greater" or "less". |
paired |
a logical indicating whether you want the paired Z-test. |
sigma |
numeric > 0 representing the assumed population standard deviation used to scale the data. |
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. |
... |
further arguments to be passed to or from methods. |
relevanceSize |
numeric, the minimal clinical relevant mean difference that we do not want to miss under the alternative. Default relevanceSize=NULL implies relevanceSize=abs(meanDiffMin) |
Returns an e-value.
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.
saviZTestStat(z=3, n1=100, parameter=0.4, eType="grow")
saviZTestStat(z=3, n1=100, parameter=0.4^2, eType="eGauss")
saviZTestStat(z=3, n1=100, parameter=0.4, eType="eCauchy")
# evidence for the alternative over minimal efficacy
saviRelevanceZStat(z=3, n1=100, parameter=0.4)
# evidence for minimal efficacy over the alternative
saviRelevanceZStat(z=0.35, n1=100, parameter=0.4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.