Description Usage Arguments Details Value References Examples
RBF_ttest
calculates a Replication Bayes Factor (Verhagen &
Wagenmakers, 2014) for t-Tests.
1 2 |
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 |
M |
Number of posterior samples (either MCMC or Normal distribution). |
store.samples |
If |
The Replication Bayes Factor is a marginal likelihood ratio between two models, characterized by the following positions:
H0: The position of a skeptic, who does not place confidence in the findings of the original study and assumes θ \approx 0.
Hr: The position of a proponent, who expects the original study to be a faithful estimation of the effect size and for which the replication offers additional evidence. This is formulated as θ \approx θ_{orig} with θ_{orig} being the effect size estimate from the original study.
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.
An object of ReplicationBF
class.
Verhagen2014ReplicationBF
Bos2002ReplicationBF
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.