snapshot: snapshot

View source: R/snapshot.R

snapshotR Documentation

snapshot

Description

Function for applying Snapshot Bayesian Hybrid Meta-Analysis Method for two-independent means and raw correlation coefficients.

Usage

snapshot(ri, ni, m1i, m2i, n1i, n2i, sd1i, sd2i, tobs, alpha = 0.05)

Arguments

ri

A vector of length two containing the raw correlation coefficients of the original study and replication

ni

A vector of length two containing the sample size of the original study and replication for the raw correlation coefficient

m1i

A vector of length two containing the means in group 1 for the original study and replication for two-independent means

m2i

A vector of length two containing the means in group 2 for the original and replication for two-independent means

n1i

A vector of length two containing the sample sizes in group 1 for the original study and replication for two-independent means

n2i

A vector of length two containing the sample sizes in group 2 for the original study and replication for two-independent means

sd1i

A vector of length two containing the standard deviations in group 1 for the original study and replication for two-independent means

sd2i

A vector of length two containing the standard deviations in group 2 for the original study and replication for two-independent means

tobs

A vector of length two containing the t-values of the original study and replication

alpha

A numerical value specifying the alpha level as used in the original study (default is 0.05, see Details)

Details

The function computes posterior probabilities (assuming a uniform prior distribution) for four true effect sizes (no, small, medium, and large) based on an original study and replication while taking into account statistical significance in the original study. For more information see van Aert and van Assen (2016).

Two different effect size measures can be used as input for the snapshot function: two-independent means and raw correlation coefficients. Analyzing two-independent means can be done by either providing the function group means (m1i and m2i), standard deviations (sd1i and sd2i), and sample sizes (n1i and n2i) or t-values (tobs) and sample sizes (n1i and n2i). Both options should be accompanied with input for the argument alpha. See the Example section for an example. Raw correlation coefficients can be analyzed by supplying ri and ni to the snapshot function next to input for the argument alpha.

The snapshot function assumes that a two-tailed hypothesis test was conducted in the original study. In case a one-tailed hypothesis test was conducted in the original study, the alpha level has to be multiplied by two. For example, if a one-tailed hypothesis test was conducted with an alpha level of .05, an alpha of 0.1 has to be submitted to snapshot.

Value

The snapshot function returns a data frame with posterior probabilities for no (p.0), small (p.sm), medium (p.me), and large (p.la) true effect size.

Author(s)

Robbie C.M. van Aert R.C.M.vanAert@tilburguniversity.edu

References

van Aert, R.C.M. & van Assen, M.A.L.M. (2017). Bayesian evaluation of effect size after replicating an original study. PLoS ONE, 12(4), e0175302. doi:10.1371/journal.pone.0175302

Examples

### Example as presented on page 491 in Maxwell, Lau, and Howard (2015)
snapshot(ri = c(0.243, 0.114), ni = c(80, 172))


RobbievanAert/puniform documentation built on Sept. 22, 2023, 2:53 a.m.