HajnalBF_onez {NAP}R Documentation

Hajnal's ratio in one-sample zz tests

Description

In a N(μ,σ02)N(\mu,\sigma_0^2) population with known variance σ02\sigma_0^2, consider the two-sided one-sample zz-test for testing the point null hypothesis H0:μ=0H_0 : \mu = 0 against H1:μ0H_1 : \mu \neq 0. Based on an observed data, this function calculates the Hajnal's ratio in favor of H1H_1 when the prior assumed on the standardized effect size μ/σ0\mu/\sigma_0 under the alternative places equal probability at +δ+\delta and δ-\delta (δ>0\delta>0 prefixed).

Usage

HajnalBF_onez(obs, nObs, mean.obs, test.statistic, 
              es1 = 0.3, sigma0 = 1)

Arguments

obs

Numeric vector. Observed vector of data.

nObs

Numeric or numeric vector. Sample size(s). Same as length(obs) when numeric.

mean.obs

Numeric or numeric vector. Sample mean(s). Same as mean(obs) when numeric.

test.statistic

Numeric or numeric vector. Test-statistic value(s).

es1

Positive numeric. δ\delta as above. Default: 0.30.3. For this, the prior on the standardized effect size μ/σ0\mu/\sigma_0 takes values 0.30.3 and 0.3-0.3 each with equal probability 1/2.

sigma0

Positive numeric. Known standard deviation in the population. Default: 1.

Details

Value

Positive numeric or numeric vector. The Hajnal's ratio(s).

Author(s)

Sandipan Pramanik and Valen E. Johnson

References

Hajnal, J. (1961). A two-sample sequential t-test.Biometrika, 48:65-75, [Article].

Schnuerch, M. and Erdfelder, E. (2020). A two-sample sequential t-test.Biometrika, 48:65-75, [Article].

Examples

HajnalBF_onez(obs = rnorm(100))

[Package NAP version 1.1 Index]