# NOT RUN {
data <- matrix(rnorm(200), ncol = 2)
x <- bvar(data, lags = 2)
# Get densities of standard hyperparameters
density(x)
# Plot them
plot(density(x))
# Only get the density of the marginal likelihood
density(x, vars = "ml")
# Check out the constant's density on both dependents
plot(density(x, vars_impulse = 1))
# Get the density of the 1st lag of variable 2's coefficients with
# respect to variable 1
idx <- independent_index(var = 2, n_vars = 2, lag = 1)
density(x, vars_response = 1, vars_impulse = idx)
# }
Run the code above in your browser using DataLab