I am trying to replicate a regression that I saw in an article:
Y_t=a(L) Y_(t-1)
Where L
is a polynomial in the lag operator and it said that
“Lag dependent variable [Lags: 1-24] is entered as four-quarter moving average for lags 1, 5, 9, 13, 17 and 21, respectively”.
I saw that I can do something like this:
lm(Y ~ I(lag(Y)) + I(lag(Y, 5)) + I(lag(Y, 9)) + I(lag(Y, 13)) + I(lag(Y, 17)) + I(lag(Y, 21)) + I(lag(Y, 24))
Is there a shorter way?
Thanks in advance.