You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an issue where I got a C++ error saying std::bad_alloc when running some specific models. A minimal reproduction example is provided below. This appears to be caused by the function VARXForecastEvals when it is called on line 907 of BigVARObjectClass.R as follows:
X <- matrix(Y[(offset + 1):nrow(Y), (k1 + 1):ncol(Y)], ncol = m)
AICbench1 <- VARXForecastEval(matrix(ZFull$Y[, 1:k1], ncol = k1), as.matrix(X), p, s, T2, T3, "AIC", h = h, loss = loss,
delta = delta)
Here, the issue is that we are dropping max(p,s) observations (offset) from X and Y, and then internally the functions run (i.e. ICX) is dropping offset observations again.
I am unsure if it is best to just lag all the data to obtain a design matrix in the start, and then avoid doing any lagging again later on. But it seems like a neat solution in my opinion.
Minimal reproduction example:
data <- matrix(rnorm(108), 36)
varx <- list(k = 1, s = 12, contemp = F)
model <- constructModel(data, 12, struct = "Basic", 4, VARX = varx, T1 = 21, T2 = 22, gran = c(50, 10))
fit <- cv.BigVAR(model)
The text was updated successfully, but these errors were encountered:
I had an issue where I got a C++ error saying
std::bad_alloc
when running some specific models. A minimal reproduction example is provided below. This appears to be caused by the functionVARXForecastEvals
when it is called on line 907 ofBigVARObjectClass.R
as follows:Here, the issue is that we are dropping
max(p,s)
observations (offset) from X and Y, and then internally the functions run (i.e. ICX) is dropping offset observations again.I am unsure if it is best to just lag all the data to obtain a design matrix in the start, and then avoid doing any lagging again later on. But it seems like a neat solution in my opinion.
Minimal reproduction example:
The text was updated successfully, but these errors were encountered: