Learn R Programming

RoBMA (version 4.0.0)

pooled_heterogeneity.brma: Pooled Heterogeneity for brma Objects

Description

Computes the pooled (aggregated) heterogeneity estimate (tau) from a fitted brma object by averaging across the scale model matrix.

Usage

# S3 method for brma
pooled_heterogeneity(object, probs = c(0.025, 0.975), conditional = FALSE, ...)

Value

A brma_samples object containing posterior samples. When printed, displays a summary table. Use summary() to obtain the summary table directly. The samples can be converted to posterior draws formats using as_draws().

Arguments

object

a fitted brma object

probs

quantiles of the posterior distribution to be displayed. Defaults to c(.025, .975) for 95% credible intervals.

conditional

whether to return the pooled heterogeneity conditional on the heterogeneity component for RoBMA product-space objects. Defaults to FALSE.

...

additional arguments passed to predict.brma; wrapper arguments such as newdata, type, and quiet are fixed.

Details

This function is a convenience wrapper around predict.brma(..., type = "terms.scale", newdata = TRUE).

For location-scale models (with scale regression), the pooled heterogeneity averages tau across the scale model matrix proportionately to the levels observed in the data.

For models without scale regression, this returns the single tau parameter.

For multilevel (3-level) models, the returned tau is the total heterogeneity: tau = sqrt(tau_within^2 + tau_between^2).

See Also

predict.brma(), pooled_effect(), blup()

Examples

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

  pooled_heterogeneity(fit)
}
}

Run the code above in your browser using DataLab