I have the folllowing codes:
y<-my.data$GDP
tt<-my.data$period
dataset<-data.frame(y,tt)
gnp.lm <- dynlm(formula = y ~ L(d(y), 1:10) + 1 + L(y) + tt, data = dataset)
Both my.data$period
and my.data$GDP
are one-dimensional arrays with the same lengths.
However, I got the following error message:
error in fix.by(by.x x) 'by' must match numbers of columns.
Could someone help me with this problem?