HajnalBF_onez {NAP} | R Documentation |
Hajnal's ratio in one-sample
tests
Description
In a population with known variance
, consider the two-sided one-sample
-test for testing the point null hypothesis
against
. Based on an observed data, this function calculates the Hajnal's ratio in favor of
when the prior assumed on the standardized effect size
under the alternative places equal probability at
and
(
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 |
mean.obs |
Numeric or numeric vector. Sample mean(s). Same as |
test.statistic |
Numeric or numeric vector. Test-statistic value(s). |
es1 |
Positive numeric. |
sigma0 |
Positive numeric. Known standard deviation in the population. Default: 1. |
Details
Users can either specify
obs
, ornObs
andmean.obs
, ornObs
andtest.statistic
.If
obs
is provided, it returns the corresponding Bayes factor value.If
nObs
andmean.obs
are provided, the function is vectorized over both arguments. Bayes factor values corresponding to the values therein are returned.If
nObs
andtest.statistic
are provided, the function is vectorized over both arguments. Bayes factor values corresponding to the values therein are returned.
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))