drmeta: Fit a design-indexed meta-analytic location-scale model

View source: R/drmeta.R

drmetaR Documentation

Fit a design-indexed meta-analytic location-scale model

Description

Fit a design-indexed meta-analytic location-scale model

Usage

drmeta(
  yi,
  vi,
  dr,
  mods = NULL,
  method = c("REML", "ML"),
  constrained = TRUE,
  gamma_max = 8,
  gamma_fixed = NULL,
  control = list(),
  .quiet = FALSE
)

Arguments

yi

Numeric vector of study effect estimates.

vi

Numeric vector of sampling variances.

dr

Numeric design-robustness index in [0, 1].

mods

Optional numeric vector or matrix of location moderators. An intercept is added automatically.

method

Either "REML" or "ML".

constrained

If TRUE, impose gamma >= 0. If FALSE, allow either sign.

gamma_max

Finite optimization bound for abs(gamma). The default, 8, matches the range used in the simulation study reported in the accompanying manuscript. Refit under a wider bound whenever the estimate piles up near it.

gamma_fixed

Optional fixed value for gamma, used for null fitting.

control

Optional list passed to optim().

.quiet

If TRUE, suppress the design-diagnostic warnings about the distribution of dr. Intended for internal refitting, where the design index is identical across calls and the diagnostics would repeat without conveying new information. Errors and input validation are unaffected.

Value

An object of class drmeta: a list whose components include beta (location coefficients), vcov, ci_beta, tau0sq, gamma, tau2i, sigma2, weights, residuals, logLik, method, constrained, convergence, and the supplied data.

Examples

path <- system.file("extdata", "bcg_design_robustness.csv", package = "drmeta")
bcg <- utils::read.csv(path)
fit <- drmeta(yi = bcg[["yi"]], vi = bcg[["vi"]], dr = bcg[["dr"]])
summary(fit)

drmeta documentation built on Aug. 25, 2026, 1:08 a.m.