What is the difference between lag(x, 1:2) and lag(x, 1) in plm package

Hi all! I am new in R and now I have a question regarding pgmm function in plm package.

I have a regression like this:

y_it = alpha * y_i_t_1 + beta * x_i_t_1 + error term, where y_it is dependent variable(for individual i in time t); y_i_t_1 is the lagged value of y_it(value in period t-1); x_i_t_1 are regressors; alpha and beta are coefficients.

I want to use y_i_t_2(two-year lagged value of y_it) as instrument variable here so I tried two different codes as:
pgmm(y_it ~ lag(y_it, 1) + x_i_t_1 | lag(y_it, 2))


pgmm(y_it ~ lag(y_it, 1:2) + x_i_t_1 | lag(y_it, 2:3)).
After that I got two different results. Therefore, I want to ask what is the difference between these two codes? What does lag(x, 1:2) mean here in R? Thank you in advance!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.