0

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

  • Hi, it's very hard to help you with the few information you give. You should provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). The package [`reprex`](https://reprex.tidyverse.org/) is a nice tool to make one. – bretauv Apr 28 '23 at 09:51

0 Answers0