Description Usage Arguments 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. This function calculates the operating characteristics (OC) and average sample number (ASN) of the Sequential Bayes Factor design 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 3 4 5 | SBFHajnal_twot(es = c(0, 0.2, 0.3, 0.5), es1 = 0.3,
n1min = 2, n2min = 2, n1max = 5000, n2max = 5000,
RejectH1.threshold = exp(-3), RejectH0.threshold = exp(3),
batch1.size.increment, batch2.size.increment,
nReplicate = 50000, nCore)
|
es |
Numeric vector. Standardized effect size differences (μ_2 - μ_1)/σ where OC and ASN are desired. Default: |
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. |
n1min |
Positive integer. Minimum sample size from Group-1 in the sequential comparison. Should be at least 2. Default: 1. |
n2min |
Positive integer. Minimum sample size from Group-2 in the sequential comparison. Should be at least 2. Default: 1. |
n1max |
Positive integer. Maximum sample size from Group-1 in the sequential comparison. Default: 1. |
n2max |
Positive integer. Maximum sample size from Group-2 in the sequential comparison. Default: 1. |
RejectH1.threshold |
Positive numeric. H_0 is accepted if BF ≤ |
RejectH0.threshold |
Positive numeric. H_0 is rejected if BF ≥ |
batch1.size.increment |
function. Increment in sample size from Group-1 at each sequential step. Default: |
batch2.size.increment |
function. Increment in sample size from Group-2 at each sequential step. Default: |
nReplicate |
Positve integer. Number of replicated studies based on which the OC and ASN are calculated. Default: 50,000. |
nCore |
Positive integer. Default: One less than the total number of available cores. |
A list with three components named summary
, BF
, and N
.
$summary
is a data frame with columns effect.size
containing the values in es
. At those values, acceptH0
contains the proportion of times H_0
is accepted, rejectH0
contains the proportion of times H_0
is rejected, inconclusive
contains the proportion of times the test is inconclusive, ASN
contains the ASN, and avg.logBF
contains the expected weight of evidence values.
$BF
is a matrix of dimension length(es)
by nReplicate
. Each row contains the Bayes factor values at the corresponding standardized effec size in nReplicate
replicated studies.
$N
is a matrix of the same dimension as $BF
. Each row contains the sample size required to reach a decision at the corresponding standardized effec size in nReplicate
replicated studies.
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 | out = SBFHajnal_twot(n1max = 100, n2max = 100, es = c(0, 0.3), nCore = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.