Skip to contents

Given two or more `misskappa_estimate` objects fit on the **same subjects in the same order**, returns the joint asymptotic covariance of their stacked coefficient vector. The estimators can differ (available-case, IPW, Gwet), use different weight schemes, or be computed on different rater subsets of the same subjects.

The joint matrix is assembled from per-subject influence functions: `V = (1 / n^2) * crossprod(cbind(psi_1, ..., psi_K))`. This is the standard nonparametric IF-based joint asymptotic covariance.

All `misskappa_estimate` inputs expose per-subject influence functions, so any combination of estimators, weight schemes, or rater subsets fit on the same subjects can be stacked.

Row alignment is the caller's responsibility: the helper only checks that the number of subjects matches across inputs and stacks `psi` column-wise.

Usage

joint_vcov(...)

Arguments

...

Two or more `misskappa_estimate` objects. Optionally named; names are used as prefixes for the output `dimnames`.

Value

A square numeric matrix of dimension `K_total x K_total`, where `K_total` is the total number of coefficients across all inputs. Row / column names are `<prefix>.<coefficient>` for each fit.

Examples

if (FALSE) { # \dontrun{
set.seed(1)
n <- 500; R <- 4
x <- matrix(sample.int(5, n * R, replace = TRUE), n, R)
x[matrix(runif(n * R) < 0.3, n, R)] <- NA
ac  <- estimate_kappa_raw(x, method = "available")
ipw <- kappa(x, estimator = "ipw")
V   <- joint_vcov(ac = ac, ipw = ipw)

# Hausman-style Wald test of kappa_AC = kappa_IPW (Conger).
delta <- coef(ac)[["Conger"]] - coef(ipw)[["Conger"]]
se <- sqrt(V["ac.Conger", "ac.Conger"]
         + V["ipw.Conger", "ipw.Conger"]
         - 2 * V["ac.Conger", "ipw.Conger"])
z <- delta / se
} # }