Skip to contents

Reconstructs the model-implied covariance matrix \(\Sigma(x) = \Lambda(x)\Lambda(x)' + \sigma^2 I\) at a covariate value x for every saved posterior draw, where \(\lambda_{jk}(x) = q_{jk} f_k' x\).

Usage

posterior_Sigma(fit, x, summary = c("median", "mean", "none"))

Arguments

fit

A fitted "bcaia" object from bcaia.

x

A numeric covariance-covariate vector of length Pcov (matching the columns of Xcov, including the intercept).

summary

One of "median" (default), "mean", or "none". With "none" the full J x J x nsamp array of posterior draws is returned.

Value

A J x J matrix (posterior summary) or, when summary = "none", a J x J x nsamp array.

See also