Learn R Programming

RoBMA (version 4.0.0)

as_zplot.brma: Transform brma Object to Zplot

Description

Transforms an estimated brma model into a zplot object that can be summarized and plotted to assess replicability.

Usage

# S3 method for brma
as_zplot(
  object,
  significance_level = stats::qnorm(0.975),
  max_samples = 10000,
  ...
)

Value

The input object with added class "zplot_brma" and a new zplot list component containing:

estimates

a list with posterior samples for EDR and missing-study weights

data

a list with significance_level, observed z-statistics, N_significant, and N_observed

Arguments

object

a normal-outcome brma object.

significance_level

z-value threshold for significance. Defaults to qnorm(0.975) (two-sided alpha = 0.05).

max_samples

maximum number of posterior samples for estimation. Defaults to 10000. Use Inf to use all posterior samples.

...

additional arguments (currently unused).

Details

Zplot analysis estimates the Expected Discovery Rate (EDR), the posterior mean probability that an exact replication would be statistically significant at the supplied threshold. This provides insight into the replicability of findings in a literature.

The implementation uses extrapolation mode by default, which removes selection-model weights when evaluating the model-implied z-value density. PET/PEESE regression terms remain part of the fitted location model. Zplot diagnostics are available only for normal outcome models. GLMM objects are rejected because their raw likelihood is on a count scale while zplot diagnostics require observed effect-size z-statistics with standard errors.

The resulting object retains all original brma properties while adding zplot results, enabling both standard meta-analytic summaries and zplot diagnostics on the same object.

See Also

summary.zplot_brma(), plot.zplot_brma(), hist.zplot_brma()

Examples

Run this code
if (FALSE) {
if (requireNamespace("metadat", quietly = TRUE)) {
  data(dat.lehmann2018, package = "metadat")
  fit <- bPET(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")

  zfit <- as_zplot(fit)
  summary(zfit)
  plot(zfit)
}
}

Run the code above in your browser using DataLab