HajnalBF_twoz {NAP} | R Documentation |
Hajnal's ratio in two-sample
tests
Description
In case of two independent populations and
with known common variance
, consider the two-sample
-test for testing the point null hypothesis of difference in their means
against
. Based on an observed data, this function calculates the Hajnal's ratio in favor of
when the prior assumed under the alternative on the difference between standardized effect sizes
places equal probability at
and
(
prefixed).
Usage
HajnalBF_twoz(obs1, obs2, n1Obs, n2Obs, mean.obs1, mean.obs2,
test.statistic, es1 = 0.3, sigma0 = 1)
Arguments
obs1 |
Numeric vector. Observed vector of data from Group-1. |
obs2 |
Numeric vector. Observed vector of data from Group-2. |
n1Obs |
Numeric or numeric vector. Sample size(s) from Group-1. Same as |
n2Obs |
Numeric or numeric vector. Sample size(s) from Group-2. Same as |
mean.obs1 |
Numeric or numeric vector. Sample mean(s) from Group-1. Same as |
mean.obs2 |
Numeric or numeric vector. Sample mean(s) from Group-2. Same as |
test.statistic |
Numeric or numeric vector. Test-statistic value(s). |
es1 |
Positive numeric. |
sigma0 |
Positive numeric. Known common standard deviation of the populations. Default: 1. |
Details
A user can either specify
obs1
andobs2
, orn1Obs
,n2Obs
,mean.obs1
andmean.obs2
, orn1Obs
,n2Obs
, andtest.statistic
.If
obs1
andobs2
are provided, it returns the corresponding Bayes factor value.If
n1Obs
,n2Obs
,mean.obs1
andmean.obs2
are provided, the function is vectorized over the arguments. Bayes factor values corresponding to the values therein are returned.If
n1Obs
,n2Obs
, andtest.statistic
are provided, the function is vectorized over each of the 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_twoz(obs1 = rnorm(100), obs2 = rnorm(100))