bf_bic: Compute BIC Bayes factor from ANOVA summary statistics.

Description Usage Arguments Details Author(s) References Examples

View source: R/bf_bic.R

Description

This function employs the BIC method (Kass and Raftery, 1995) to compute an approximation of the Bayes factor.

Usage

1
bf_bic(F, df1, df2, repeated = FALSE, report.as = "BF01")

Arguments

F

the observed F statistic

df1

the between-treatments degrees of freedom

df2

the residual degrees of freedom

repeated

a logical indicating whether design is repeated measures (TRUE) or between subjects (FALSE). Defaults to FALSE

report.as

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

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).

Author(s)

Thomas J. Faulkenberry <faulkenberry@tarleton.edu>

References

Kass, R. E., & Raftery, A. E. (1995). Bayes Factors. Journal of the American Statistical Association, 90(430), 773. doi:10.2307/2291091

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## using BIC approximation
## between subjects design, observed F(3,96) = 2.76
bf_bic(F=2.76, df1=3, df2=96)

## repeated measures design, observed F(1,22) = 1.336
bf_bic(F=1.336, df1=1, df2=22, repeated=TRUE)

## between subjects design, observed F(2,25) = 5.43
## report as support for alternative
bf_bic(F=5.43, df1=2, df2=25, report.as="BF10")

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