Skip to contents

Canonical formula keyword for the known-sampling-error term in two-stage meta-regression workflows. The name makes it explicit that what is "known" is the V matrix (the sampling-error covariance). meta_known_V() is retained as a soft-deprecated alias; both names desugar identically in the formula parser.

Usage

meta_V(V, type = "exact")

Arguments

V

Known sampling variance or covariance marker. In current exact-additive fits, pass the actual matrix via the top-level known_V = argument to gllvmTMB(). Formula-level V = V names the marker and keeps the syntax aligned with drmTMB::meta_V().

type

Sampling-covariance mode. "exact" is implemented. "proportional" is not implemented and fails clearly in the formula parser rather than being treated as exact.

Value

A formula marker; never evaluated.

Details

Pass the matrix V via the top-level known_V = V argument to gllvmTMB() when using the exact-additive (default) form. For block-diagonal within-study correlation, build V via block_V(). type = "proportional" is not implemented and is deliberately rejected rather than silently treated as exact.

See also

meta_known_V() (deprecated alias); block_V(); gllvmTMB().

Examples

if (FALSE) { # \dontrun{
# Two-stage meta-regression with a known per-row sampling-variance V.
set.seed(131)
df <- expand.grid(
  site  = factor(seq_len(50)),
  trait = factor(paste0("t", 1:3))
)
df$value <- rnorm(nrow(df), sd = 0.5)
df$sampling_var <- runif(nrow(df), min = 0.02, max = 0.08)
V <- diag(df$sampling_var)
fit <- gllvmTMB(
  value ~ 0 + trait + latent(0 + trait | site, d = 1) +
    meta_V(V = V, type = "exact"),
  data = df, trait = "trait", unit = "site", known_V = V
)
} # }