bf_mws: Compute MWS Bayes factors from ANOVA summary statistics.

Description Usage Arguments Details Author(s) References Examples

View source: R/bf_mws.R

Description

This function employs the MWS method, based on the Pearson Type VI priors recommended by Maruyama (2009) and Wang and Sun (2014).

Usage

1
bf_mws(F, df1, df2, report.as = "BF01", alpha = -0.5)

Arguments

F

the observed F statistic

df1

the between-treatments degrees of freedom

df2

the residual degrees of freedom

report.as

a string indicating whether to report Bayes factor as support for null ("BF01") or alternative ("BF10"). Defaults to "BF01"

alpha

hyperparameter for scale of Pearson Type VI prior. Wang and Sun recommend choosing alpha between -0.5 and 0. Defaults to -0.5, which provides asymptotic approximation to multivariate Cauchy prior.

Details

Minimally, the user must provide three inputs: F = the observed F statistic df1 = the "between-treatments" degrees of freedom df2 = the residual degrees of freedom

The function outputs the value of BF_01 by default, though this can be changed to BF_10 by the user (see below).

Additional options may be specified – see below

Author(s)

Thomas J. Faulkenberry <faulkenberry@tarleton.edu>

References

Maruyama, Y. (2009). A Bayes factor with reasonable model selection consistency for ANOVA model. arXiv preprint arXiv:0906.4329.

Wang, M., & Sun, X. (2014). Bayes Factor Consistency for One-way Random Effects Model. Communications in Statistics - Theory and Methods, 43(23), 5072–5090. doi:10.1080/03610926.2012.739252

Examples

1
2
3
4
5
6
## using MWS method with alpha = -0.5 (default)
## observed F(2,15) = 7.16
bf_mws(F=7.16, df1=2, df2=15)

## using alpha=0 and reporting as BF10
bf_mws(F=7.16, df1=2, df2=15, report.as="BF10", alpha=0)

tomfaulkenberry/anovaBFcalc documentation built on Dec. 6, 2019, 7:40 p.m.