I have already looked into other posts, but unfortunately I haven't found a solution to the error that I'm getting. I have tried transforming the data, by creating the var_eq1 variable into a list before, but I haven't managed to solve the issue yet.
The code I'm entering is the following:
var_eq1 <- dynlm(ibex35ts ~ L(ibex35ts, 1:2) + L(inflationts , 1:2), start = c(1996, 1), end = c(2023, 1))
The variables I'm using are time series, and the output should take the form of a list. The error that I'm getting is the following:
Error in `[[<-.data.frame`(`*tmp*`, i, value = c(25L, 27L, 25L, 1L, 22L, :
replacement has 644 rows, data has 322
I was expecting the output to be a list with the coefficient estimates of the regression, I just get that error