Description Usage Arguments Details Value Author(s) References Examples
In case of two independent populations N(μ_1,σ^2) and N(μ_2,σ^2) with unknown common variance σ^2, consider the two-sample t-test for testing the point null hypothesis of difference in their means H_0 : μ_2 - μ_1 = 0 against H_1 : μ_2 - μ_1 \neq 0. Based on an observed data, this function calculates the Hajnal's ratio in favor of H_1 when the prior assumed under the alternative on the difference between standardized effect sizes (μ_2 - μ_1)/σ places equal probability at +δ and -δ (δ>0 prefixed).
1 2 | HajnalBF_twot(obs1, obs2, n1Obs, n2Obs, mean.obs1, mean.obs2,
sd.obs1, sd.obs2, test.statistic, es1 = 0.3)
|
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 |
sd.obs1 |
Numeric or numeric vector. Sample standard deviations(s) from Group-1. Same as |
sd.obs2 |
Numeric or numeric vector. Sample standard deviations(s) from Group-2. Same as |
test.statistic |
Numeric or numeric vector. Test-statistic value(s). |
es1 |
Positive numeric. δ as above. Default: 0.3. For this, the prior on (μ_2 - μ_1)/σ takes values 0.3 and -0.3 each with equal probability 1/2. |
A user can either specify obs1
and obs2
, or n1Obs
, n2Obs
, mean.obs1
, mean.obs2
, sd.obs1
and sd.obs2
, or n1Obs
, n2Obs
, and test.statistic
.
If obs1
and obs2
are provided, it returns the corresponding Bayes factor value.
If n1Obs
, n2Obs
, mean.obs1
, mean.obs2
, sd.obs1
and sd.obs2
are provided, the function is vectorized over the arguments. Bayes factor values corresponding to the values therein are returned.
If n1Obs
, n2Obs
, and test.statistic
are provided, the function is vectorized over each of the arguments. Bayes factor values corresponding to the values therein are returned.
Positive numeric or numeric vector. The Hajnal's ratio(s).
Sandipan Pramanik and Valen E. Johnson
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].
1 | HajnalBF_twot(obs1 = rnorm(100), obs2 = rnorm(100))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.