Description Usage Arguments Value Author(s) References Examples
In two-sided fixed design one-sample z-tests with normal moment prior assumed on the standardized effect size μ/σ_0 under the alternative and a prefixed sample size, this function calculates the expected weights of evidence (that is, expected log(Bayes Factor)) of the test at a varied range of standardized effect sizes.
1 2 3 | fixedNAP.onez_n(es = c(0, 0.2, 0.3, 0.5), n.fixed = 20,
tau.NAP = 0.3/sqrt(2), sigma0 = 1,
nReplicate = 50000, nCore)
|
es |
Numeric vector. Standardized effect sizes μ/σ_0 where the expected weights of evidence is desired. Default: |
n.fixed |
Positive integer. Prefixed sample size. Default: 20. |
tau.NAP |
Positive numeric. Parameter in the moment prior. Default: 0.3/√2. This places the prior modes of the standardized effect size μ/σ_0 at 0.3 and -0.3. |
sigma0 |
Positive numeric. Known standard deviation in the population. Default: 1. |
nReplicate |
Positve integer. Number of replicated studies based on which the expected weights of evidence is calculated. Default: 50,000. |
nCore |
Positive integer. Default: One less than the total number of available cores. |
A list with two components named summary
and BF
.
$summary
is a data frame with columns effect.size
containing the values in es
and avg.logBF
containing the expected weight of evidence values at those 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.
Sandipan Pramanik and Valen E. Johnson
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]
1 | out = fixedNAP.onez_n(n.fixed = 20, 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.