Skip to contents

Reconstructs the model-implied covariance \(\Sigma = \Lambda\Lambda' + V\), with \(V\) block-diagonal holding \(v_m^2 I_{J_m}\), for every saved posterior draw and summarises it.

Usage

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

Arguments

fit

A fitted "spbgfm" object from spbgfm.

domains

Optional length-2 integer vector c(m1, m2) selecting a block of the matrix: the within-domain block \(\Sigma^{mm}\) when m1 == m2, the cross-domain block \(\Sigma^{mm^\prime}\) otherwise. NULL (default) returns the full \(J \times J\) matrix.

summary

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

Value

A matrix, or an array of posterior draws when summary = "none".

See also