
In case of two independent populations
SBFNAP_twoz(es = c(0, 0.2, 0.3, 0.5), n1min = 1, n2min = 1,
n1max = 5000, n2max = 5000,
tau.NAP = 0.3/sqrt(2), sigma0 = 1,
RejectH1.threshold = exp(-3), RejectH0.threshold = exp(3),
batch1.size.increment, batch2.size.increment,
nReplicate = 50000, nCore)
Numeric vector. Standardized effect size differences c(0, 0.2, 0.3, 0.5)
.
Positive integer. Minimum sample size from Group-1 in the sequential comparison. Default: 1.
Positive integer. Minimum sample size from Group-2 in the sequential comparison. Default: 1.
Positive integer. Maximum sample size from Group-1 in the sequential comparison. Default: 1.
Positive integer. Maximum sample size from Group-2 in the sequential comparison. Default: 1.
Positive numeric. Parameter in the moment prior. Default:
Positive numeric. Known common standard deviation of the populations. Default: 1.
Positive numeric. RejectH1.threshold
. Default: exp(-3)
.
Positive numeric. RejectH0.threshold
. Default: exp(3)
.
function. Increment in sample size from Group-1 at each sequential step. Default: function(narg){20}
. This means an increment of 20 samples at each step.
function. Increment in sample size from Group-2 at each sequential step. Default: function(narg){20}
. This means an increment of 20 samples at each step.
Positve integer. Number of replicated studies based on which the OC and ASN are calculated. Default: 50,000.
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.
Pramanik, S. and Johnson, V. (2022). Efficient Alternatives for Bayesian Hypothesis Tests in Psychology. Psychological Methods. Just accepted.
Johnson, V. and Rossell, R. (2010). On the use of non-local prior densities in Bayesian hypothesis tests. Journal of the Royal Statistical Society: Series B, 72:143-170. [Article]
# NOT RUN {
out = SBFNAP_twoz(n1max = 100, n2max = 100, es = c(0, 0.3), nCore = 1)
# }
Run the code above in your browser using DataLab