pgmm(formula,data,effect="individual",model="twosteps",
instruments=NULL,inst.transformation="l",lags.endog=1,
first.period=-99,last.period=-1,...)
## S3 method for class 'pgmm':
summary(object, ...)
## S3 method for class 'summary.pgmm':
print(x,digits=5,length.line=70, ...)pgmm,pdata.frame
and is mandatory,"individual" or "twoways","onestep" or "twosteps","l" for instruments in level and "d" for instruments
in first difference,c("pgmm","panelmodel"), which has the following elements :K the number of explanatory
variables, Ky the number of lags of the dependent variable
and Kt the number of time dummies,print, summary and print.summary methods.pgmm estimate a model for panel data with the general method of
moments estimator. A dynamic model is specified by fixing the
lags.endog argument to 1 or 2. By default, the instruments used
are the independent variables (and the dependent variable if
lags.endog>0). The complete list of instruments can also be
specified with the instruments argument. For each instruments,
the first period used is specified by first.period , the last
period by last.period and the way they are introduced (in level
or in first difference by inst.transformation). These three
arguments may be of length one, in this case, all the instruments are
treated the same way. In case of a dynamic model, they may be of
length two, then the first element is used for the dependent
variable and the second element is used for the independent
variables. They finally may be of length equal to the number of
instruments to specify a specific rule for each instrument.plm for the estimation of models with instrumental variables.library(Ecdat)
data(Snmesp)
pdata.frame(Snmesp,"firm","year")
z <- pgmm(n~lag(w)+lag(w,2),Snmesp,effect="twoways",model="twosteps",lags.endog=2,
last.period=c(-2),
inst.transformation=c("l"),instruments=~n+w)
summary(z)Run the code above in your browser using DataLab