r2bf: Convert correlation _r_ to a Bayes Factor

View source: R/r2bf.R

r2bfR Documentation

Convert correlation r to a Bayes Factor

Description

Uses default values from the BayesFactor::ttest.tstat function to convert an effect size r to a Bayes factor, given the sample size n. Also includes as attributes the thresholds, at that sample size, for conventionally "accepting the null hypothesis" (i.e., BF < .333) or "rejecting the null hypothesis" (i.e., BF > 3). Bayes Factors are returned "raw," that is, as the ratio of the evidence for the alternative hypothesis to the evidence for the null hypothesis.

Usage

r2bf(r, n)

Arguments

r
n

Examples

exampleR <- cor(dat_cochraneEtAl_2019_PLOSOne$enum , dat_cochraneEtAl_2019_PLOSOne$mot)
r2bf(exampleR , nrow(dat_cochraneEtAl_2019_PLOSOne))


akcochrane/ACmisc documentation built on Nov. 24, 2024, 11:22 a.m.