vcov.bayesianVARs_bvar {bayesianVARs} | R Documentation |
Extract posterior draws of the (time-varying) variance-covariance matrix for a VAR model
Description
Returns the posterior draws of the possibly time-varying variance-covariance
matrix of a VAR estimated via bvar()
. Returns the full paths if
sv_keep="all"
when calling bvar()
. Otherwise, the draws of the
variance-covariance matrix for the last observation are returned, only.
Usage
## S3 method for class 'bayesianVARs_bvar'
vcov(object, t = seq_len(nrow(object$logvar)), ...)
Arguments
object |
An object of class |
t |
Vector indicating which points in time should be extracted, defaults to all. |
... |
Currently ignored. |
Value
An array of class bayesianVARs_draws
of dimension T \times M
\times M \times draws
, where T
is the number of observations,
M
the number of time-series and draws
the number of stored
posterior draws.
See Also
summary.bayesianVARs_draws
, coef.bayesianVARs_bvar()
.
Examples
# Access a subset of the usmacro_growth dataset
data <- usmacro_growth[,c("GDPC1", "CPIAUCSL", "FEDFUNDS")]
# Estimate a model
mod <- bvar(data, sv_keep = "all", quiet = TRUE)
# Extract posterior draws of the variance-covariance matrix
bvar_vcov <- vcov(mod)
[Package bayesianVARs version 0.1.3 Index]