Skip to contents

Internal backend for vector-valued quadratic agreement. For a subjects-by-raters-by-features array, estimates Conger, Fleiss, and Brennan-Prediger kappas generated by the squared vector loss `(x - y)' W (x - y)`, where `W` is a full symmetric positive-semidefinite feature-weight matrix. The `"pairwise"` method uses pairwise-available covariance moments and is MCAR-oriented (Conger and Fleiss only). The `"nt_fiml"` method fits the saturated normal mean/covariance by EM and is the vector analogue of [kappa_quadratic_fiml()]. The `"nt_fiml_cs"` method fits the same normal FIML under the block compound-symmetry covariance `Sigma = J_R %x% Psi + I_R %x% E`. With a quadratic weight this is the covariance/variance-components route used for Lin's concordance correlation coefficient under unbalanced repeated measures. The full matrix `W` couples features in the loss, separate from the missing-data machinery.

Both methods need each rater-feature cell to be observed at least once. The `"pairwise"` method additionally requires every rater-feature pair to overlap at least once, because each covariance entry is estimated from directly co-observed rows. Direct `"nt_fiml"` callers should enforce the same complete pairwise co-observation condition when the saturated covariance functional is the target.

The full-`W` route is internal because the current normal-FIML backend is numerically strict: it inverts per-pattern covariance blocks and can return a numerical error when the fitted covariance is singular or nearly singular (for example, a deterministic or non-varying feature within a missingness pattern). There is no ridge or rank-aware fallback yet. The block compound-symmetry route (`"nt_fiml_cs"`) is the structured counterpart and needs only a connected co-observation graph.

Usage

kappa_vector_quadratic(
  x,
  method = c("pairwise", "nt_fiml", "nt_fiml_cs"),
  W = NULL,
  em_options = list(),
  ranges = NULL
)

Arguments

x

Numeric array with dimensions subjects, raters, features.

method

`"pairwise"`, `"nt_fiml"`, or `"nt_fiml_cs"`.

W

Optional features-by-features symmetric positive-semidefinite weight matrix. Defaults to the identity matrix.

em_options

Used by `"nt_fiml"` / `"nt_fiml_cs"`. A named list with `tol` and `max_iter`. The covariance structure is selected by `method` (the estimator name), so `mean` must be `"free"`. The exchangeable equal-mean model has not been generalized to vector-valued ratings. `fd_h` is accepted for backward compatibility and ignored because the observed information is analytic.

ranges

Optional features-by-2 matrix of `(lo, hi)` score bounds, one row per feature, that fixes the Brennan-Prediger chance baseline `sum_a W_aa (hi_a - lo_a)^2 / 6` instead of estimating each width from the observed data range. Fixing the range makes the chance denominator deterministic, so the Brennan-Prediger standard error is exact and the estimand no longer drifts with the sample range. It is the vector analogue of the scalar `values` argument. `NULL` (default) keeps the observed-range behaviour. Used by the `"nt_fiml"` / `"nt_fiml_cs"` methods only (the `"pairwise"` method does not report Brennan-Prediger).

Value

A `misskappa_estimate` object with `Conger`, `Fleiss`, and `Brennan-Prediger` coefficients (`"pairwise"` reports `Conger` and `Fleiss` only), covariance matrix, per-subject influence functions, and fitted mean/covariance moments.

References

Carrasco, J. L., & Jover, L. (2003). Estimating the generalized concordance correlation coefficient through variance components. Biometrics, 59(4), 849–858.

King, T. S., & Chinchilli, V. M. (2001). A generalized concordance correlation coefficient for continuous and categorical data. Statistics in Medicine, 20(14), 2131–2147.

King, T. S., Chinchilli, V. M., & Carrasco, J. L. (2007). A repeated measures concordance correlation coefficient. Statistics in Medicine, 26(16), 3095–3113.

Lin, L. I.-K. (1989). A concordance correlation coefficient to evaluate reproducibility. Biometrics, 45(1), 255–268.