Package 'BayesRep'

Title: Bayesian Analysis of Replication Studies
Description: Provides tools for the analysis of replication studies using Bayes factors (Pawel and Held, 2022) <doi:10.1111/rssb.12491>.
Authors: Samuel Pawel [aut, cre]
Maintainer: Samuel Pawel <[email protected]>
License: GPL-3
Version: 0.42.3
Built: 2025-02-10 03:28:59 UTC
Source: https://github.com/samch93/bayesrep

Help Index


BayesRep package

Description

The BayesRep package provides various tools for Bayesian analysis of replication studies.

repPosterior visualizes the posterior distribution of the effect size based on both studies. BFs computes the sceptical Bayes factor (Pawel and Held, 2022), BFr computes the replication Bayes factor (Verhagen and Wagenmakers, 2014), and BFe computes the equality of effect size Bayes factor (Bayarri and Mayorall, 2002).

These functions take effect estimates and their standard errors from original and replication study as inputs. Throughout, original effect estimate and standard error are denoted by to and so and replication effect estimate and standard error are denoted tr and sr. It is assumed that each effect estimate is normally distributed around its true underlying effect size with variance equal to its squared standard error

toθoN(θo,so2) and trθrN(θr,sr2).\code{to} \, | \, \theta_o \sim \mathrm{N}(\theta_o, \code{so}^2) ~ \mathrm{and} ~ \code{tr} \, | \, \theta_r \sim \mathrm{N}(\theta_r, \code{sr}^2).

These assumptions may be inadequate for studies with small sample size (there are special functions for data with continuous outcomes and standardized mean difference effect size, BFsSMD and BFrSMD, and binary outcomes with log odds ratio effects, BFslogOR and BFrlogOR, which are based on the exact distribution of the data). If not specified otherwise, it is assumed that the true effect sizes from both studies are the same (θo=θr\theta_o = \theta_r).

Author(s)

Maintainer: Samuel Pawel [email protected] (ORCID)

References

Bayarri, M. and Mayorall, A. (2002). Bayesian Design of "Successful" Replications. The American Statistician, 56(3): 207-214. doi:10.1198/000313002155

Verhagen, J. and Wagenmakers, E. J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 145:1457-1475. doi:10.1037/a0036731

Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491

See Also

Useful links:


Equality of effect size Bayes factor

Description

Computes the equality of effect size Bayes factor

Usage

BFe(to, so, tr, sr, tau, log = FALSE)

Arguments

to

Original effect estimate

so

Standard error of the original effect estimate

tr

Replication effect estimate

sr

Standard error of the replication effect estimate

tau

The heterogeneity standard deviation τ\tau under the hypothesis of unequal effect sizes H1H_1

log

Logical indicating whether the natural logarithm of the Bayes factor should be returned. Defaults to FALSE

Details

The equality of effect size Bayes factor is the Bayes factor contrasting the hypothesis of equal original and replication effect sizes H0:θo=θrH_0: \theta_o = \theta_r to the hypothesis of unequal effect sizes H1:θoθrH_1: \theta_o \neq \theta_r. Under the hypothesis of unequal effect sizes H1H_1 the study specific effect sizes are assumed to be normally distributed around an overall effect size with heterogeneity standard deviation tau.

Value

The equality of effect size Bayes factor BF01\mathrm{BF}_{01}. BF01>1\mathrm{BF}_{01} > 1 indicates that the data favour the hypothesis of equal effect sizes H0H_0 (replication success), whereas BF01<1\mathrm{BF}_{01} < 1 indicates that the data favour the hypothesis of unequal effect sizes H1H_1 (replication failure).

Author(s)

Samuel Pawel

References

Bayarri, M. and Mayorall, A. (2002). Bayesian Design of "Successful" Replications. The American Statistician, 56(3): 207-214. doi:10.1198/000313002155

Verhagen, J. and Wagenmakers, E. J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 145:1457-1475. doi:10.1037/a0036731

Examples

## strong evidence for unequal effect sizes
BFe(to = 1, tr = 0.5, so = sqrt(1/100), sr = sqrt(1/100), tau = 0.3)

## some evidence for equal effect sizes
BFe(to = 1, tr = 1, so = sqrt(1/200), sr = sqrt(1/200), tau = 0.3)

Generalized replication Bayes factor

Description

Computes the generalized replication Bayes factor

Usage

BFr(
  to,
  so,
  tr,
  sr,
  ss = 0,
  truncate = FALSE,
  log = FALSE,
  zo = NULL,
  zr = NULL,
  c = NULL,
  g = 0
)

Arguments

to

Original effect estimate

so

Standard error of the original effect estimate

tr

Replication effect estimate

sr

Standard error of the replication effect estimate

ss

Standard devation of the sceptical prior under HSH_\mathrm{S}. Defaults to 0

truncate

Logical indicating whether advocacy prior should be truncated to direction of the original effect estimate (i.e., a one-sided test). Defaults to FALSE

log

Logical indicating whether the natural logarithm of the Bayes factor should be returned. Defaults to FALSE

zo

Original z-value zo = to/so (alternative parametrization for to and so)

zr

Replication z-value zr = tr/sr (alternative parametrization for tr and sr)

c

Relative variance c = so^2/sr^2 (alternative parametrization for so and sr)

g

Relative prior variance g = ss^2/so^2. Defaults to 0 (alternative parametrization for ss)

Details

The generalized replication Bayes factor is the Bayes factor contrasting the sceptic's hypothesis that the effect size is about zero

HS:θN(0,ss2)H_{\mathrm{S}}: \theta \sim \mathrm{N}(0, \code{ss}^2)

to the advocate's hypothesis that the effect size is compatible with its posterior distribution based on the original study and a uniform prior

HA:θf(θoriginal study).H_{\mathrm{A}}: \theta \sim f(\theta \, | \, \mathrm{original~study}).

The standard replication Bayes factor from Verhagen and Wagenmakers (2014) is obtained by specifying a point-null hypothesis ss = 0 (the default).

The function can be used with two input parametrizations, either on the absolute effect scale (to, so, tr, sr, ss) or alternatively on the relative z-scale (zo, zr, c, g). If an argument on the effect scale is missing, the z-scale is automatically used and the other non-missing arguments on the effect scale ignored.

Value

The generalized replication Bayes factor BFSA\mathrm{BF}_{\mathrm{SA}}. BFSA<1\mathrm{BF}_{\mathrm{SA}} < 1 indicates that the data favour the advocate's hypothesis HAH_{\mathrm{A}} (replication success), whereas BFSA>1\mathrm{BF}_{\mathrm{SA}} > 1 indicates that the data favour the sceptic's hypothesis HSH_{\mathrm{S}} (replication failure).

Author(s)

Samuel Pawel

References

Verhagen, J. and Wagenmakers, E. J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 145:1457-1475. doi:10.1037/a0036731

Ly, A., Etz, A., Marsman, M., Wagenmakers, E. J. (2019). Replication Bayes factors from evidence updating. Behavior Research Methods, 51(6):2498-2508. doi:10.3758/s13428-018-1092-x

Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491

See Also

BFrSMD, BFrlogOR

Examples

to <- 2
tr <- 2.5
so <- 1
sr <- 1
BFr(to = to, so = so, tr = tr, sr = sr)
BFr(zo = to/so, zr = tr/sr, c = so^2/sr^2)

Generalized replication Bayes factor for logOR effect sizes

Description

Computes the generalized replication Bayes factor for log odds ratio (logOR) effect sizes

Usage

BFrlogOR(
  ao,
  bo,
  nTo = ao + bo,
  co,
  do,
  nCo = co + do,
  ar,
  br,
  nTr = ar + br,
  cr,
  dr,
  nCr = cr + dr,
  ss,
  method = c("integration", "hypergeo")
)

Arguments

ao

Number of cases in original study treatment group

bo

Number of non-cases in original study treatment group

nTo

Number of participants in original study treatment group (specify alternatively to b)

co

Number of cases in original study control group

do

Number of non-cases in original study control group

nCo

Number of participants in original study control group (specify alternatively to d)

ar

Number of cases in replication study treatment group

br

Number of non-cases in replication study treatment group

nTr

Number of participants in replication study treatment group (specify alternatively to b)

cr

Number of cases in replication study control group

dr

Number of non-cases in replication study control group

nCr

Number of participants in replication study control group (specify alternatively to d)

ss

Standard deviation of the sceptical prior under HSH_\mathrm{S}. Defaults to 0

method

Method to compute posterior density. Either "integration" (default) or "hypergeo"

Details

This function computes the generalized replication Bayes factor for log odds ratio (logOR) effect sizes using an exact binomial likelihood for the data instead of the normal approximation used in BFr (for details, see Section 4 in Pawel and Held, 2022).

Value

The generalized replication Bayes factor BFSA\mathrm{BF}_{\mathrm{SA}}. BFSA<1\mathrm{BF}_{\mathrm{SA}} < 1 indicates that the data favour the advocate's hypothesis HAH_{\mathrm{A}} (replication success), whereas BFSA>1\mathrm{BF}_{\mathrm{SA}} > 1 indicates that the data favour the sceptic's hypothesis HSH_{\mathrm{S}} (replication failure).

Author(s)

Samuel Pawel

References

Verhagen, J. and Wagenmakers, E. J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 145:1457-1475. doi:10.1037/a0036731

Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491

Examples

data("SSRPexact")
balafoutas2012 <- subset(SSRPexact, study == "Balafoutas and Sutter (2012), Science")
with(balafoutas2012,
     BFrlogOR(ao = ao, bo = bo, co = co, do = do, ar = ar, br = br, cr = cr, dr = dr,
              ss = 0))

Generalized replication Bayes factor for SMD effect sizes

Description

Computes the generalized replication Bayes factor for standardized mean difference (SMD) effect sizes

Usage

BFrSMD(
  to,
  no,
  n1o = no,
  n2o = no,
  tr,
  nr,
  n1r = nr,
  n2r = nr,
  ss,
  type = c("two.sample", "one.sample", "paired")
)

Arguments

to

tt-statistic from the original study

no

Sample size of the original study (per group)

n1o

Sample size in group 1 of the original study (only required for two-sample tt-test with unequal group sizes)

n2o

Sample size in group 2 of the original study (only specify if unequal group sizes)

tr

tt-statistic from the replication study

nr

Sample size of the replication study (per group)

n1r

Sample size in group 1 of the replication study (only required for two-sample tt-test with unequal group sizes)

n2r

Sample size in group 2 of the replication study (only required for two-sample tt-test with unequal group sizes)

ss

Standard devation of the sceptical prior under HSH_\mathrm{S}. Defaults to 0

type

Type of tt-test associated with tt-statistic. Can be "two.sample", "one.sample", "paired". Defaults to "two.sample"

Details

This function computes the generalized replication Bayes factor for standardized mean difference (SMD) effect sizes using an exact t-likelihood for the data instead of the normal approximation used in BFr (for details, see Section 4 in Pawel and Held, 2022). Data from both studies are summarized by tt-statistics and sample sizes. The following types of tt-tests are accepted:

  • Two-sample tt-test where the SMD represents the standardized mean difference between two group means (assuming equal variances in both groups).

  • One-sample tt-test where the SMD represents the standardized mean difference to the null value.

  • Paired tt-test where the SMD represents the standardized mean difference score.

Value

The generalized replication Bayes factor BFSA\mathrm{BF}_{\mathrm{SA}}. BFSA<1\mathrm{BF}_{\mathrm{SA}} < 1 indicates that the data favour the advocate's hypothesis HAH_{\mathrm{A}} (replication success), whereas BFSA>1\mathrm{BF}_{\mathrm{SA}} > 1 indicates that the data favour the sceptic's hypothesis HSH_{\mathrm{S}} (replication failure).

Author(s)

Samuel Pawel

References

Verhagen, J. and Wagenmakers, E. J. (2014). Bayesian tests to quantify the result of a replication attempt. Journal of Experimental Psychology: General, 145:1457-1475. doi:10.1037/a0036731

Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491

See Also

BFr, BFrlogOR

Examples

data("SSRPexact")
morewedge2010 <- subset(SSRPexact, study == "Morewedge et al. (2010), Science")
with(morewedge2010,
     BFrSMD(to = to, n1o = n1o, n2o = n2o, tr = tr, n1r = n1r, n2r = n2r, ss = 0))

Sceptical Bayes factor

Description

Computes the sceptical Bayes factor

Usage

BFs(to, so, tr, sr, truncate = FALSE, zo = NULL, zr = NULL, c = NULL)

Arguments

to

Original effect estimate

so

Standard error of the original effect estimate

tr

Replication effect estimate

sr

Standard error of the replication effect estimate

truncate

Logical indicating whether advocacy prior should be truncated to direction of the original effect estimate (i.e., a one-sided test). Defaults to FALSE

zo

Original z-value zo = to/so (alternative parametrization for to and so)

zr

Replication z-value zr = tr/sr (alternative parametrization for tr and sr)

c

Relative variance c = so^2/sr^2 (alternative parametrization for so and sr)

Details

The sceptical Bayes factor is a summary measure of the following two-step reverse-Bayes procedure for assessing replication success:

  1. Use the data from the original study to determine the standard deviation τγ\tau_{\gamma} of a sceptical normal prior θN(0,τγ2)\theta \sim \mathrm{N}(0, \tau_{\gamma}^2) such that the Bayes factor contrasting the null hypothesis H0:θ=0H_0: \theta = 0 to the sceptic's hypothesis HS:θN(0,τγ2)H_{\mathrm{S}}: \theta \sim \mathrm{N}(0, \tau_{\gamma}^2) equals a specified level γ(0,1]\gamma \in (0, 1]. This prior represents a sceptic who remains unconvinced about the presence of an effect at level γ\gamma.

  2. Use the data from the replication study to compare the sceptic's hypothesis HS:θN(0,τγ2)H_{\mathrm{S}}: \theta \sim \mathrm{N}(0, \tau_{\gamma}^2) to the advocate's hypothesis HA:θf(θoriginal study)H_{\mathrm{A}}: \theta \sim f(\theta \, | \, \mathrm{original~study}). The prior of the effect size under HAH_{\mathrm{A}} is its posterior based on the original study and a uniform prior, thereby representing the position of an advocate of the original study. Replication success at level γ\gamma is achieved if the Bayes factor contrasting HSH_{\mathrm{S}} to HAH_{\mathrm{A}} is smaller than γ\gamma, which means that the replication data favour the advocate over the sceptic at a higher level than the sceptic's initial objection. The sceptical Bayes factor BFS\mathrm{BF}_{\mathrm{S}} is the smallest level γ\gamma at which replication success can be established.

The function can be used with two input parametrizations, either on the absolute effect scale (to, so, tr, sr) or alternatively on the relative z-scale (zo, zr, c). If an argument on the effect scale is missing, the z-scale is automatically used and the other non-missing arguments on the effect scale ignored.

Value

The sceptical Bayes factor BFS\mathrm{BF}_{\mathrm{S}}. BFS<1\mathrm{BF}_{\mathrm{S}} < 1 indicates replication success, the smaller the value of BFS\mathrm{BF}_{\mathrm{S}} the higher the degree of replication success. It is possible that the result of the replication is so inconclusive that replication success cannot be established at any level. In this case, the sceptical Bayes factor does not exist and the function returns NaN.

Author(s)

Samuel Pawel

References

Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491

See Also

BFsSMD, BFslogOR

Examples

to <- 2
tr <- 2.5
so <- 1
sr <- 1
BFs(to = to, so = so, tr = tr, sr = sr)
BFs(zo = to/so, zr = tr/sr, c = so^2/sr^2)

Sceptical Bayes factor for logOR effect sizes

Description

Computes the sceptical Bayes factor for logOR effect sizes

Usage

BFslogOR(
  ao,
  bo,
  nTo = ao + bo,
  co,
  do,
  nCo = co + do,
  ar,
  br,
  nTr = ar + br,
  cr,
  dr,
  nCr = cr + dr,
  method = c("integration", "hypergeo")
)

Arguments

ao

Number of cases in original study treatment group

bo

Number of non-cases in original study treatment group

nTo

Number of participants in original study treatment group (specify alternatively to b)

co

Number of cases in original study control group

do

Number of non-cases in original study control group

nCo

Number of participants in original study control group (specify alternatively to d)

ar

Number of cases in replication study treatment group

br

Number of non-cases in replication study treatment group

nTr

Number of participants in replication study treatment group (specify alternatively to b)

cr

Number of cases in replication study control group

dr

Number of non-cases in replication study control group

nCr

Number of participants in replication study control group (specify alternatively to d)

method

Method to compute posterior density. Either "integration" (default) or "hypergeo"

Details

This function computes the sceptical Bayes factor for log odds ratio (logOR) effect sizes using an exact binomial likelihood for the data instead of the normal approximation used in BFs (for details, see Section 4 in Pawel and Held, 2022).

Value

The sceptical Bayes factor BFS\mathrm{BF}_{\mathrm{S}}. BFS<1\mathrm{BF}_{\mathrm{S}} < 1 indicates replication success, the smaller the value of BFS\mathrm{BF}_{\mathrm{S}} the higher the degree of replication success. It is possible that the result of the replication is so inconclusive that replication success cannot be established at any level. In this case, the sceptical Bayes factor does not exist and the function returns NaN.

Author(s)

Samuel Pawel

References

Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491

See Also

BFs, BFslogOR

Examples

data("SSRPexact")
balafoutas2012 <- subset(SSRPexact, study == "Balafoutas and Sutter (2012), Science")
with(balafoutas2012,
     BFslogOR(ao = ao, bo = bo, co = co, do = do, ar = ar, br = br, cr = cr, dr = dr))

Sceptical Bayes factor for SMD effect sizes

Description

Computes the sceptical Bayes factor for standardized mean difference (SMD) effect sizes

Usage

BFsSMD(
  to,
  no,
  n1o = no,
  n2o = no,
  tr,
  nr,
  n1r = nr,
  n2r = nr,
  type = c("two.sample", "one.sample", "paired")
)

Arguments

to

tt-statistic from the original study

no

Sample size of the original study (per group)

n1o

Sample size in group 1 of the original study (only required for two-sample tt-test with unequal group sizes)

n2o

Sample size in group 2 of the original study (only specify if unequal group sizes)

tr

tt-statistic from the replication study

nr

Sample size of the replication study (per group)

n1r

Sample size in group 1 of the replication study (only required for two-sample tt-test with unequal group sizes)

n2r

Sample size in group 2 of the replication study (only required for two-sample tt-test with unequal group sizes)

type

Type of tt-test associated with tt-statistic. Can be "two.sample", "one.sample", "paired". Defaults to "two.sample".

Details

This function computes the sceptical Bayes factor for standardized mean difference (SMD) effect sizes using an exact t-likelihood for the data instead of the normal approximation used in BFs (for details, see Section 4 in Pawel and Held, 2022). Data from both studies are summarized by tt-statistics and sample sizes. The following types of tt-tests are accepted:

  • Two-sample tt-test where the SMD represents the standardized mean difference between two group means (assuming equal variances in both groups).

  • One-sample tt-test where the SMD represents the standardized mean difference to the null value.

  • Paired tt-test where the SMD represents the standardized mean difference score.

Value

The sceptical Bayes factor BFS\mathrm{BF}_{\mathrm{S}}. BFS<1\mathrm{BF}_{\mathrm{S}} < 1 indicates replication success, the smaller the value of BFS\mathrm{BF}_{\mathrm{S}} the higher the degree of replication success. It is possible that the result of the replication is so inconclusive that replication success cannot be established at any level. In this case, the sceptical Bayes factor does not exist and the function returns NaN.

Author(s)

Samuel Pawel

References

Pawel, S. and Held, L. (2022). The sceptical Bayes factor for the assessment of replication success. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3): 879-911. doi:10.1111/rssb.12491

See Also

BFs, BFslogOR

Examples

data("SSRPexact")
morewedge2010 <- subset(SSRPexact, study == "Morewedge et al. (2010), Science")
with(morewedge2010,
     BFsSMD(to = to, n1o = n1o, n2o = n2o, tr = tr, n1r = n1r, n2r = n2r))

Formatting of Bayes factors

Description

Formats Bayes factors such that Bayes factors smaller than 1 are represented as ratios 1/x1/x, where xx is rounded to the specified number of digits, while Bayes factors larger than 1 are only rounded to the specified number of digits.

Usage

formatBF(BF, digits = "default")

Arguments

BF

Bayes factor

digits

either "default" (see Details) or a positive integer specifiying the number of decimal places to round the Bayes factor (for Bayes factors 1\geq 1) or its inverse (for Bayes factors <1< 1)

Details

The default formatting, which is recommended in Held and Ott (2018), is as follows: For very small Bayes factors BF < 1/1000, "< 1/1000" is returned. Bayes factors BF with 1/1000 \leq BF \leq 1/10 are formatted as 1/x1/x where xx is an integer and Bayes factors BF with 1/101/10 << BF << 1 as 1/x1/x, where xx is rounded to one decimal place. Accordingly, Bayes factors \leq BF << 10 are rounded to one decimal place, Bayes factors 10 \leq BF \leq 1000 are rounded to the next integer and for larger Bayes factors, "> 1000" is returned.

If digits is specified, the Bayes factor (if it is \geq 1) or its inverse (if the Bayes factor is << 1) is rounded to the number of decimal places specified and returned as a ratio if the Bayes factor is << 1.

Value

A character vector of ratios (for inputs <1< 1) or rounded numeric values (for inputs 1\geq 1) ).

Author(s)

Manuela Ott (creator of package pCalibrate), Leonhard Held (contributor of package pCalibrate), Samuel Pawel (made small changes to pCalibrate::formatBF)

References

Held, L. and Ott, M. (2018). On pp-values and Bayes factors. Annual Review of Statistics and Its Application, 5, 393-419. doi:10.1146/annurev-statistics-031017-100307

Examples

(bf <- BFr(to = 2, so = 0.5, tr = 2.5, sr = 0.9))
formatBF(BF = bf)

Effect size posterior distribution

Description

Computes the posterior distribution of the effect size based on the original and replication effect estimates and their standard errors, assuming a common underlying effect size and an initial flat prior.

Usage

repPosterior(
  to,
  so,
  tr,
  sr,
  lower = min(c(to, tr)) - 4/sqrt(1/so^2 + 1/sr^2),
  upper = max(c(to, tr)) + 4/sqrt(1/so^2 + 1/sr^2),
  nGrid = 1000,
  plot = TRUE,
  CI = TRUE,
  ...
)

Arguments

to

Original effect estimate

so

Standard error of the original effect estimate

tr

Replication effect estimate

sr

Standard error of the replication effect estimate

lower

Lower bound of range for which distribution should computed. Defaults to minimum of to and tr minus four times the pooled standard error

upper

Upper bound of range for which distribution should computed. Defaults to maximum of to and tr plus four times the pooled standard error

nGrid

Number of grid points. Defaults to 1000

plot

Logical indicating whether posterior distribution should be plotted. If FALSE, only data used for plotting are returned. Defaults to TRUE

CI

Logical indicating whether 95% highest posterior credible interval should be plotted. Defaults to TRUE

...

Additional arguments passed to matplot

Value

Plots posterior distribution of the effect size, invisibly returns a list with the data for the plot

Author(s)

Samuel Pawel

Examples

## Example from Reproducibility Project Cancer Biology
## Aird: Data from https://elifesciences.org/articles/21253 Fig4B
hro <- 25.93
lhro <- log(hro)
hroCI <- c(5.48, 122.58)
se_lhro <- diff(log(hroCI))/(2*qnorm(0.975))
hrr <- 3.75
lhrr <- log(hrr)
hrrCI <- c(1.19, 11.81)
se_lhrr <- diff(log(hrrCI))/(2*qnorm(0.975))
repPosterior(to = lhro, so = se_lhro, tr = lhrr, sr = se_lhrr)

Data from the Social Sciences Replication Project

Description

Data from the Social Sciences Replication Project. The variables are as follows:

study

Authors, year, and journal of the original study

type

Type of effect size. Either "logOR" for log oddds ratio effect size, "SMD1" for standardized mean difference from one-sample or paired tt-test, or "SMD2" for standardized mean difference from two-sample tt-test

to

tt-statistic from the original study (only available for "SMD1" and "SMD2")

n1o

Sample size in group 1 of the original study (only available for "SMD1" and "SMD2")

n2o

Sample size in group 2 of the original study (only available for "SMD2")

tr

tt-statistic from the replication study (only available for "SMD1" and "SMD2")

n1r

Sample size in group 1 of the replication study (only available for "SMD1" and "SMD2")

n2r

Sample size in group 2 of the replication study (only available for "SMD2")

ao

Number of cases in original study treatment group (only available for "logOR")

bo

Number of non-cases in original study treatment group (only available for "logOR")

co

Number of cases in original study control group (only available for "logOR")

do

Number of non-cases in original study control group (only available for "logOR")

ar

Number of cases in replication study treatment group (only available for "logOR")

br

Number of cases in replication study control group (only available for "logOR")

cr

Number of cases in replication study control group (only available for "logOR")

dr

Number of non-cases in replication study control group (only available for "logOR")

Usage

data(SSRPexact)

Format

A data frame with 21 rows and 16 variables

Author(s)

Samuel Pawel

Source

The data were manually extracted from the Bayesian supplement of the SSRP (https://osf.io/nsxgj/). The data are licensed under CC0 1.0 Universal.

References

Camerer, C. F., Dreber, A., Holzmeister, F., Ho, T.-H., Huber, J., Johannesson, M., ... Wu, H. (2018). Evaluating the replicability of social science experiments in Nature and Science between 2010 and 2015. Nature Human Behaviour, 2, 637-644. doi:10.1038/s41562-018-0399-z