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))
and
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!