Skip to content

R-Package to calculate Replication Bayes factors in different scenarios

License

Notifications You must be signed in to change notification settings

neurotroph/ReplicationBF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReplicationBF -- R package to calculate Replication Bayes Factors

This package allows users to calculate Replication Bayes Factors for different scenarios. See Verhagen & Wagenmakers (2014) and Harms (2018) for reference.

Installation

The package is currently only available through this GitHub repository, so you can install it through devtools::install_github():

devtools::install_github('neurotroph/ReplicationBF', dependencies=TRUE)

Usage

The package provides two functions to calculate Replication Bayes factors for t- (RBF_ttest) and F-tests (RBF_Ftest) respectively.

t-Tests:

# Example 1 from Verhagen & Wagenmakers (2014)
# Using a Normal approximation to the original's posterior distribution
RBF_ttest(2.10, c(11, 11), 3.06, c(27, 28), method = "NormApprox")

# Using MCMC to draw samples from the original's posterior distribution
RBF_ttest(2.10, c(11, 11), 3.06, c(27, 28), method = "MCMC")

F-Tests:

RBF_Ftest(27.0, c(3, 48), 52, 3.2, c(3, 33), 37)

References

  • Harms, C. (in press). A Bayes Factor for Replications of ANOVA Results. The American Statistician. Retrieved from http://arxiv.org/abs/1611.09341
  • Verhagen, J., & Wagenmakers, E.-J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 143(4), 1457–1475. http://doi.org/10.1037/a0036731

About

R-Package to calculate Replication Bayes factors in different scenarios

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published