vcov_decomp {postpack} | R Documentation |
Decompose the posterior of a variance-covariance node
Description
For each posterior sample, extract the standard deviation and correlation components of a monitored node representing a variance-covariance matrix.
Usage
vcov_decomp(
post,
param,
sigma_base_name = "sigma",
rho_base_name = "rho",
invert = FALSE,
check = TRUE,
auto_escape = TRUE
)
Arguments
post |
A |
param |
A vector of regular expressions specifying the nodes to match for plotting.
Must match only one base node name in |
sigma_base_name |
Base node name to assign to the standard deviation vector component?
Defaults to |
rho_base_name |
Same as |
invert |
Take the inverse of the matrix node matched by |
check |
Perform checks sequentially that the matrix node is (a) square, (b) symmetrical, and (c) positive definite
before proceeding with the calculations? If set to |
auto_escape |
Automatically escape |
Value
A mcmc.list
object.
Examples
# load example mcmc.list
data(cjs)
# "SIG" is a covariance matrix node
SIG_decomp = vcov_decomp(cjs, "SIG")
# extract the posterior mean correlation matrix, and reformat
array_format(post_summ(SIG_decomp, "rho")["mean",])