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]

st: gmm problem with e(sample) and xtinstruments

From   lucie gadenne <>
Subject   st: gmm problem with e(sample) and xtinstruments
Date   Fri, 12 Nov 2010 19:24:42 +0100

I'm new to using gmm with panel style instrument, and I have the
following problem.
When I run the regression :
"gmm (y - {xb:x1 x2}- {bo}),  instruments( x2) xtinstruments(z,
lags(0,2)) winitial (xt L)"
I get standard estimation results, except that I am told my number of
observations  is N, where N=number of observations in my dataset.
This shouldn't be as some of my observations (roughly 10%) have by
construction no value for the instrument z, whatever the period.
My understanding is that the gmm command should drop the observations
for which none of the xtinstruments are available, and I do want to
drop them.
I then type :
"count if e(sample)"
I get 0 observations. If however I type:
"count if !e(sample)"
I have all my observations.
And finally "dis e(N)" gives me N, the total number of observations.
So I have two questions:
_why doesn't gmm exclude the observations for which none of the lags
of the instrument is available?
_why is e(sample) not marking any observations as part of my estimation sample?

Thanks a lot for your help,

Lucie Gadenne
PhD Student
Paris School of Economics

*   For searches and help try:

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