Description Usage Arguments Details Value Examples
create_inventory
constructs companion matrix for VAR(p) model.
1 | bvar_jeff(Yts, p, const)
|
Yts |
n x T matrix of data. |
p |
the lag lenght of the VAR. |
const |
A scalar, where const = 1 for model with intercept, const = 0 for model without intercept. |
This function draws from the posterior of a VAR(p) model with non-informative prior
A List with:
betar_all n x np+1 x R-burn matrices of coefficients.
Sigr_all n x n x R-burn matrices of variance covariance matrices.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | yt <- as.matrix(t(Xmat))
k <- 2
n <- dim(yt)[1]
q <- 1
m <- k*q
Q <- as.matrix(diag(0.1,k))
R <- as.matrix(diag(n)*0.01)
alpha_0 <- matrix(0,m,1)
P_0 <- diag(m)
lambdasim <- matrix(rep(rnorm(n,0,1)*0.1,k),
nrow = n, ncol = k, byrow = TRUE)
diag(lambdasim) <- 1
lambdasim[upper.tri(lambdasim)] <- 0
lambda <- lambdasim
Tt <- dim(yt)[2]
phi <- diag(rnorm(k,0,1))
const <- 0
ft <- multimove_gibbs(yt,phi,Q,lambda,const,Tt,q,alpha_0,P_0,R)
param <- bvar_jeff(ft,q,0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.