Skip to content

Commit

Permalink
Fix generating from VECM models
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Oct 1, 2024
1 parent 760b93e commit 748ac64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/vecm.R
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ generate.VECM <- function(x, new_data, specials, ...){
ect <- t(y_lag[1,]) %*% beta %*% coef[seq_len(r),]

# Short-run dynamics
st <- t(Z)%*%coef[-seq_len(r),]
st <- c(Z) %*% coef[-seq_len(r),]

.sim[i, ] <- y_lag[1,] + ect + st + .innov[i,]
y_lag <- rbind(.sim[i, , drop = FALSE], y_lag)[seq_len(p + 1), , drop = FALSE]
Expand Down

0 comments on commit 748ac64

Please sign in to comment.