Skip to content

Commit

Permalink
Faster forecasts
Browse files Browse the repository at this point in the history
  • Loading branch information
franzmohr committed Jul 2, 2023
1 parent 987e43b commit 6d638bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/draw_forecast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ arma::mat draw_forecast(int &i, // index of draw
// Forecast for next period
pred.submat(0, j + 1, k - 1, j + 1) = a0_i * coef * pred.col(j) + a0_i * u;

// Update lags
// Update lags of endogenous variables
if (p > 1) {
for (int l = 0; l < (p - 1); l++) {
pred.submat((l + 1) * k, j + 1, (l + 2) * k - 1, j + 1) = pred.submat(l * k, j, (l + 1) * k - 1, j);
Expand Down

0 comments on commit 6d638bd

Please sign in to comment.