| ml_meta | R Documentation |
Fits a random-effects meta-analytic model at each unique time point in a
long-format dataset of multi-wave effect sizes. Inference uses robust
variance estimation (RVE) with optional Tipton (2015) small-sample
corrections via the clubSandwich package.
ml_meta(
data,
yi,
vi,
study,
time,
alpha = 0.05,
rho = 0.8,
small_sample = TRUE,
min_k = 2L,
method = "REML",
engine = c("rma.uni", "rma.mv")
)
data |
A |
yi |
Character. Name of the effect-size column. |
vi |
Character. Name of the sampling-variance column. |
study |
Character. Name of the study-ID column (cluster variable). |
time |
Character. Name of the follow-up time column (numeric). |
alpha |
Significance level for confidence intervals and p-values.
Default |
rho |
Assumed within-study correlation between effect sizes (used only
when |
small_sample |
Logical. If |
min_k |
Integer. Minimum number of studies required to fit a model at
a given time point. Default |
method |
Character. Variance estimator passed to metafor. Default
|
engine |
Character. Fitting engine: |
An object of class ml_meta (a data.frame) with one row per time
point and columns: time, k, theta, se, df, t_stat, p_val,
ci_lb, ci_ub, tau2, note.
Attributes:
"fits"Named list of fitted model objects (one per time point).
"weights_by_time"Named list of weight vectors for downstream
use by ml_sens() and ml_benchmark().
"engine", "alpha", "rho", "small_sample"Call metadata.
Two fitting engines are supported:
"rma.uni" (default)metafor::rma.uni() – appropriate when each
study contributes exactly one effect size per time point. Simpler,
faster, and stores tau2 directly from the REML estimate.
"rma.mv"metafor::rma.mv() with a prebuilt working covariance
matrix – appropriate when studies contribute multiple effect sizes at
the same time point (dependent effects within cluster). Requires the
rho argument.
Hedges, L. V., Tipton, E., & Johnson, M. C. (2010). Robust variance estimation in meta-regression with dependent effect size estimates. Research Synthesis Methods, 1(1), 39-65.
Tipton, E. (2015). Small sample adjustments for robust variance estimation with meta-regression. Psychological Methods, 20(3), 375-393.
ml_sens(), ml_benchmark(), ml_spline()
dat <- sim_longitudinal_meta(k = 10, times = c(0, 6, 12), seed = 1)
result <- ml_meta(dat, yi = "yi", vi = "vi", study = "study", time = "time")
print(result)
plot(result)
# rma.mv engine for dependent effects
result_mv <- ml_meta(dat, yi = "yi", vi = "vi", study = "study", time = "time",
engine = "rma.mv", rho = 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.