dynamic panel models in R

I would like to estimate dynamic panel models in R, e.g. Arelano Bond (1991). I have a simple dataset with 3 variables household loan flows to GDP (hh_flow_to_GDP), household consumption growth (hhconsgrowth) and consumption gap (consgap, devitaion from trend). I have already estimated simple within and random models with plm package. The data is framed correctly according to ID and year. Yet if I estimate the code below, I receive the error results below. What can be the problem? many thanks, Mihaly

the code:

z2 <- pgmm(hh_flow_to_gdp ~ lag(hh_flow_to_gdp, 1)+ lag(hhconsgrowth, 0:1)+lag(consgap, 0:1) | lag(hh_flow_to_gdp, 2:99) +lag(hhconsgrowth, 2:99) + lag(consgap, 2:99),
data = panel_data3, effect = "twoways", model = "onestep",
transformation = "d")

the error:

Error in solve.default(crossprod(WX, t(crossprod(WX, A2)))) :
system is computationally singular: reciprocal condition number = 6.9769e-22
In addition: Warning messages:
1: In pgmm(hh_flow_to_gdp ~ lag(hh_flow_to_gdp, 1) + lag(hhconsgrowth, :
the first-step matrix is singular, a general inverse is used
2: In pgmm(hh_flow_to_gdp ~ lag(hh_flow_to_gdp, 1) + lag(hhconsgrowth, :
the second-step matrix is singular, a general inverse is used

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