Coefficients Covariance Matrix Adjustment

Here we describe the variance-covariance matrix adjustment of coefficients.

Introduction

To estimate the covariance matrix of coefficients, there are many ways. In mmrm package, we implemented asymptotic, empirical, Jackknife and Kenward-Roger methods. For simplicity, the following derivation are all for unweighted mmrm. For weighted mmrm, we can follow the details of weighted least square estimator.

Asymptotic Covariance

Asymptotic covariance are derived based on the estimate of β.

Following the definition in details in model fitting, we have

β̂ = (XWX)−1XWY

cov(β̂) = (XWX)−1XWcov(ϵ)WX(XWX)−1 = (XWX)−1

Where W is the block diagonal matrix of inverse of covariance matrix of ϵ.

Empirical Covariance

Empirical covariance, also known as the robust sandwich estimator, or “CR0”, is derived by replacing the covariance matrix of ϵ by observed covariance matrix.

cov(β̂) = (XWX)−1(∑iXiWiϵ̂iϵ̂iWiXi)(XWX)−1 = (XWX)−1(∑iXiLiLiϵ̂iϵ̂iLiLiXi)(XWX)−1

Where Wi is the block diagonal part for subject i of W matrix, ϵ̂i is the observed residuals for subject i, Li is the Cholesky factor of Σi−1 (Wi = LiLi).

See the detailed explanation of these formulas in the Weighted Least Square Empirical Covariance vignette.

Jackknife Covariance

Jackknife method in mmrm is the “leave-one-cluster-out” method. It is also known as “CR3”. Following McCaffrey and Bell (2003), we have

cov(β̂) = (XWX)−1(∑iXiLi(Ii − Hii)−1Liϵ̂iϵ̂iLi(Ii − Hii)−1LiXi)(XWX)−1

where

Hii = Xi(XX)−1Xi

Please note that in the paper there is an additional scale parameter $\frac{n-1}{n}$ where n is the number of subjects, here we do not include this parameter.

Bias-Reduced Covariance

Bias-reduced method, also known as “CR2”, provides unbiased under correct working model. Following McCaffrey and Bell (2003), we have cov(β̂) = (XWX)−1(∑iXiLi(Ii − Hii)−1/2Liϵ̂iϵ̂iLi(Ii − Hii)−1LiXi)(XWX)−1

where

Hii = Xi(XX)−1Xi

Kenward-Roger Covariance

Kenward-Roger covariance is an adjusted covariance matrix for small sample size. Details can be found in Kenward-Roger

McCaffrey, Daniel F, and Robert M Bell. 2003. “Bias Reduction in Standard Errors for Linear Regression with Multi-Stage Samples.” Quality Control and Applied Statistics 48 (6): 677–82.