Statalist


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

Re: st: RE: xtdpd vs. xtabond2 discrepancy


From   "Brian P. Poi" <[email protected]>
To   [email protected]
Subject   Re: st: RE: xtdpd vs. xtabond2 discrepancy
Date   Thu, 14 Jan 2010 08:12:44 -0600 (CST)

On Wed, 13 Jan 2010, [email protected] wrote:

I am having some issues replicating some -xtdpd- results with
-gmm-.  First, -gmm- generates a puzzling error when I specify
analytic derivatives and use instruments with a higher lag
limit.  Second, even when I don't specify the analytic
derivatives, -gmm- generates different results from -xtdpd-.

Here I repeat David Drukker's example with one change: I
increase the lag limit for both the level and differenced
equation by 1.  Stata reports a conformability error and I
don't understand why:

. webuse abdata, clear

.
. gmm (n - {rho}*L.n - {c}) (D.n - {rho}*LD.n  ),
xtinstruments(1: D.n, lags(2/2)) xtinstruments(2:n, lags(3/.))
instrume
nts(2:, noconstant) deriv(1/rho = -1*L.n) deriv(1/c=-1)
deriv(2/rho = -1*LD.n) winitial(xt LD) onestep vce(unadjusted)
variables(L.n ) nocommonesample

Step 1
                      *:  3200  conformability error
            gmm_deriv():     -  function returned error
        criterion_gnr():     -  function returned error
     opt__calluser1_q():     -  function returned error
      opt__eval_gn_q1():     -  function returned error
            opt__eval():     -  function returned error
opt__looputil_iter0_gn():     -  function returned error
         opt__loop_gn():     -  function returned error
             optimize():     -  function returned error
                mymin():     -  function returned error
             _gmm_wrk():     -  function returned error
                <istmt>:     -  function returned error
r(3200);

.
. xtdpd n L.n, dgmm(n, lagrange(3 .)) lgmm(n, lag(2))


The comformability error being produced by -gmm- with analytic derivatives and the incorrect results produced without them are due to a bug related to specifying the minimum lag greater than two for XT-style instruments in a differenced equation with one lag of the dependent variable included as a regressor.

That bug has been fixed, and the fix will be included in a future adofile update.

With the corrected version of -gmm-, it and -xtdpd- produce identical results for jrief's example.

   -- Brian Poi
   -- [email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index