
Hartung-Knapp-Sidik-Jonkman interval with DerSimonian-Laird or REML heterogeneity
Source:R/meta_pooling.R
morie_meta_hksj.RdPools k site estimates and replaces the Wald variance of the pooled
estimate, \(1/\sum w\), by \(q/\sum w\) with
\(q = \sum w (y - \hat\mu)^2 / (k - 1)\), using \(t_{k-1}\) quantiles
(Hartung and Knapp 2001; Sidik and Jonkman 2002). The interval is at least
as wide as the Wald interval exactly when \(q \ge 1\)
(Research.P13HKSJ.hksj_wider_iff); \(q = 0\) only when every
site equals the pooled value, where the interval collapses to a point
(Q_eq_zero_iff); and with equal weights the HKSJ variance is the
one-sample \(t\) variance \(s^2/k\) of the unweighted effects, so the
method is then the ordinary \(t\) interval (hksj_equal_weights).
The between-site variance is DerSimonian-Laird by default or restricted
maximum likelihood, maximised by golden-section search on
\([0, \tau^2_{max}]\) (the same search as the Python arm).
Usage
morie_meta_hksj(estimates, variances, tau2 = c("DL", "REML"), level = 0.95)Value
A list with k, tau2, tau2_method,
estimate, Q (the weighted residual sum of squares at the
random-effects weights), q (\(Q/(k-1)\)), hksj and
wald (each with variance, se, ci;
hksj also df), wider_than_wald (\(q \ge 1\)),
degenerate (\(q = 0\)), equal_weights,
t_variance (\(s^2/k\)), weights and theorems.
Examples
est <- c(-0.25, -0.10, -0.40, 0.05, -0.30)
v <- c(0.010, 0.020, 0.015, 0.030, 0.012)
h <- morie_meta_hksj(est, v)
c(tau2 = h$tau2, q = h$q, hksj_se = h$hksj$se, wald_se = h$wald$se, wider = h$wider_than_wald)
#> tau2 q hksj_se wald_se wider
#> 0.006967742 1.086177560 0.070056784 0.067220197 1.000000000
r <- morie_meta_hksj(est, v, tau2 = "REML")
c(tau2 = r$tau2, q = r$q)
#> tau2 q
#> 0.002908036 1.271198965