Skip to contents

Obtains the linear Kenward-Roger adjusted covariance matrix for the coefficient estimates from the P matrices and the contracted S_Q. Used in mmrm() fitting if vcov is "Kenward-Roger-Linear".

Usage

h_var_adj_contracted(v, w, p, s_q)

Arguments

v

(matrix)
unadjusted covariance matrix.

w

(matrix)
covariance matrix of the estimated covariance parameters.

p

(matrix)
P matrix from h_get_kr_comp().

s_q

(matrix)
contracted Q sum S_Q from h_get_kr_comp() called with w.

Value

The matrix of adjusted covariance matrix.

Details

See the section "Contracted linear covariance adjustment" in vignette("kenward", package = "mmrm"). The full w is used, so that cross-group covariance parameter covariances contribute.