RBF_ttest: Calculate a Replication Bayes Factor for a two-sample t-Test.

Description Usage Arguments Details Value References Examples

Description

RBF_ttest calculates a Replication Bayes Factor (Verhagen & Wagenmakers, 2014) for t-Tests.

Usage

1
2
RBF_ttest(t.orig, n.orig, t.rep, n.rep, method = "NormApprox",
  M = 1e+05, store.samples = FALSE)

Arguments

t.orig

t-statistic of the original study.

n.orig

Numeric vector (2 elements) with cell sizes.

t.rep

t-tstatistic of the replication study.

n.rep

Numeric vector (2 elements) with cell sizes.

method

Either "NormApprox" for a Normal approximation of the original study's posterior distribution or "MCMC" for an approximation through the Metropolis algorithm.

M

Number of posterior samples (either MCMC or Normal distribution).

store.samples

If TRUE, the returned object contains M samples from the original study's posterior distribution (required for plot_RBF).

Details

The Replication Bayes Factor is a marginal likelihood ratio between two models, characterized by the following positions:

In contrast to the originally proposed Replication Bayes factor, this method estimates the Bayes factor using importance sampling. This yields different results than the code provided by Verhagen and Wagenmakers (2014), but is more stable and less biased than the Monte Carlo estimate (see Bos, 2002) in cases where original and replication study yield different effect size estimates.

Value

An object of ReplicationBF class.

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# Example 1 from Verhagen & Wagenmakers (2014)
# Using a Normal approximation to the original's posterior distribution
RBF_ttest(2.18, c(10, 11), 3.06, c(27, 27), method = "NormApprox")
RBF_ttest(2.18, c(10, 11), 0.25, c(27, 27), method = "NormApprox")
RBF_ttest(2.18, c(10, 11), 2.44, c(16, 17), 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")
RBF_ttest(2.18, c(10, 11), 0.25, c(27, 27), method = "MCMC")
RBF_ttest(2.18, c(10, 11), 2.44, c(16, 17), method = "MCMC")

## End(Not run)

neurotroph/ReplicationBF documentation built on May 28, 2019, 3:39 p.m.