Skip to contents

pooled_vcov() is deprecated and is not used by csdm() estimators. Use vcov() on a fitted model for supported mean-group inference. The function remains available temporarily so existing code can migrate.

Usage

pooled_vcov(beta_i, weights = NULL, pairwise = TRUE)

Arguments

beta_i

Numeric matrix of unit-specific coefficients (\(N x K\)); rows = units, columns = coefficients. May contain NAs.

weights

Optional numeric vector of length N with nonnegative weights summing to 1. If NULL, uses equal weights.

pairwise

Logical; use pairwise-complete covariances across units (default TRUE).

Value

A K x K covariance matrix for the MG mean, with dimnames inherited from colnames(beta_i).

Details

Weights are fixed relative weights, normalized on the retained units. The calculation assumes independent unit estimates with a common covariance: the weighted sample covariance is divided by \(1-\sum_i w_i^2\), then multiplied by \(\sum_i w_i^2\). Equal weights give sample covariance divided by N. With missing coefficients, use pairwise=FALSE to select one complete-unit sample. Pairwise covariance with missing coefficients is not implemented. This is not an inverse-variance pooled estimator or a general covariance estimator for arbitrary unit-specific covariance matrices. Its name can be misleading because it calculates the covariance of a fixed-weight average of unit estimates under the stated common-covariance and independence assumptions.