[R] Problems with plm's pgmm: changing results

Rolan Paul Veron Cruz rolanvc at yahoo.com
Mon Jan 16 08:56:06 CET 2012


Hello,

I'm a newbie with R, and this is my first time to post here.  Apologies in advanced if I should be posting my question on another list.

I'm working on a problem on Arellano and Bond's GMM estimator, and I've chosen to use plm/pgmm.  My issue is, I'm getting different results from pgmm() every time I run it.  Here's my code:

library(plm)
mydata = read.csv('mydata.csv')
ab = pgmm(formula = y ~ lag(y,1), data = mydata, gmm.inst=~lag(gmm_inst,1), effect = "individual", model="onestep")
coef(ab)

I noticed that every time I run the last 2 lines, I get different results after a few or so runs.  Sometimes, I get an error, then in the next run, I get results.  I can't figure this out, and I'm a bit desperate for a light at the end of the tunnel.

I'm attaching the data file I'm using.  It's a N=150, T=30 panel data with practically only one variable.  

Thank you very much!
Rolan


More information about the R-help mailing list