Skip to content

Commit

Permalink
add Q in posterior
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwang15 committed Jul 16, 2024
1 parent c3ea3ff commit b380b91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bsvars_sign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Rcpp::List bsvar_sign_cpp(
mat posterior_hyper(N + 3, S);
cube posterior_A(N, K, S);
cube posterior_B(N, N, S);
cube posterior_Q(N, N, S);
cube posterior_Sigma(N, N, S);
cube posterior_Theta0(N, N, S);
cube posterior_shocks(N, T, S);
Expand Down Expand Up @@ -139,6 +140,7 @@ Rcpp::List bsvar_sign_cpp(
posterior_hyper.col(s) = hyper;
posterior_A.slice(s) = B.t();
posterior_B.slice(s) = Q.t() * h_invp;
posterior_Q.slice(s) = Q;
posterior_Sigma.slice(s) = Sigma;
posterior_Theta0.slice(s) = chol_Sigma * Q;
posterior_shocks.slice(s) = shocks;
Expand All @@ -165,6 +167,7 @@ Rcpp::List bsvar_sign_cpp(
_["hyper"] = posterior_hyper,
_["A"] = posterior_A,
_["B"] = posterior_B,
_["Q"] = posterior_Q,
_["Sigma"] = posterior_Sigma,
_["Theta0"] = posterior_Theta0,
_["shocks"] = posterior_shocks
Expand Down

0 comments on commit b380b91

Please sign in to comment.