For each posterior sample, extract the standard deviation and correlation components of a monitored node representing a variance-covariance matrix.
vcov_decomp( post, param, sigma_base_name = "sigma", rho_base_name = "rho", invert = FALSE, check = TRUE, auto_escape = TRUE )
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 |
A mcmc.list
object.
# 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",])#> [,1] [,2] #> [1,] 1.0000000 0.1847515 #> [2,] 0.1847515 1.0000000