Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: gmm and a panel data set

From   "Brian P. Poi" <>
Subject   Re: st: gmm and a panel data set
Date   Thu, 23 Feb 2012 16:27:54 -0600

Marder, Andrew wrote:
Dear Statalist,

I am having some difficulty using the gmm command.  When I use the command as follows:

gmm (`moment_condition'), winitial(identity) instruments(L.(`instruments'))

The command is able to return some estimates.  I am unsure how valid these estimates are because when I run the command treating my data as a panel:

xtset firm_id year
gmm (`moment_condition'), winitial(xt L) xtinstruments(`instruments', lags(1))

I get the following error:

warning: 20398 missing values returned for equation 1 at initial values
             gmm_xtZ_i():  3301  subscript invalid
           gmm_ABond_W():     -  function returned error
              _gmm_wrk():     -  function returned error
                 <istmt>:     -  function returned error

From what I've read this could be due to an unbalanced panel or missing data.  Taking a look at my data, it is both unbalanced and has missing data:

. tsset
       panel variable:  firm_id (unbalanced)
        time variable:  year, 1989 to 2009, but with gaps
                delta:  1 unit

Do you have any knowledge of what is causing this error?  Any suggestions on how to estimate a GMM model using a messy panel data set?

Regardless of how your data is -tsset-, you should not get those cryptic error messages from Mata.  That appears to be a bug in -gmm-.  If you send your dataset and do-file to me privately, I'd be happy to look into the problem and report back to statalist once I figure out what is causing it.

    -- Brian Poi

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index