Skip to content

Commit

Permalink
Improve VECM xreg -> matrix flattening
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Nov 1, 2024
1 parent e9f5548 commit cb2f2eb
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 @@ -8,7 +8,7 @@ train_vecm <- function(.data, specials, ic, ...) {

# Get xreg
constant <- specials$xreg[[1]]$constant
xreg <- do.call(cbind, specials$xreg[[1]]$xreg) # Convert from df to matrix
xreg <- Reduce(cbind, specials$xreg[[1]]$xreg) # Convert from df to matrix

# Choose best model
reduce(transpose(expand.grid(p = p, constant = constant)),
Expand Down

0 comments on commit cb2f2eb

Please sign in to comment.