Bookmark and Share

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


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

st: RE: -gmm- and incorporate offset/exposure variable?


From   "Brian P. Poi" <[email protected]>
To   <[email protected]>
Subject   st: RE: -gmm- and incorporate offset/exposure variable?
Date   Tue, 11 Jan 2011 18:48:25 -0500

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David Ward
Sent: Tuesday, January 11, 2011 4:48 PM
To: [email protected]
Subject: st: -gmm- and incorporate offset/exposure variable?

The article by Brian Poi starting on page 6 of Stata News (Vol. 25(2)) at
http://www.stata.com/news/statanews.25.2.pdf
contains an example on using -gmm- to estimate a Poisson model with
instruments.

***************************************************
. webuse docvisits, clear
. gmm (docvis - exp({xb:private chronic female income}+{b0})),
instruments(private chronic female age black hispanic)
***************************************************

Is there an easy way to modify this to include an offset variable; that is,
a variable that is constrained to enter with a coefficient equal to 1.0?

Dave Ward


-----------

Dave,

To include an offset variable, just include it in the moment equation with
an (implied) coefficient of one.  Here's an example that uses an exposure
variable from -help poisson-:

. webuse dollhill3, clear
. gen lnpyears = ln(pyears)
. poisson deaths smoke, offset(lnpyears) vce(robust)
. gmm (deaths - exp({b0} + {b1}*smokes + lnpyears)), instruments(smokes)


Notice there is no parameter on lnpyears in the -gmm- command; the
coefficient is by definition one.  Also, that variable is not included in
the list of instruments.  In this example, -gmm- doesn't even converge when
I do include lnpyears as an instrument, and I'm not sure whether it's a
valid instrument or not--I suppose it depends on your application.  The
standard errors differ by a factor of sqrt{N/(N-1)}, where N is sample size,
because -poisson- with the 'vce(robust)' option makes a small-sample
adjustment but -gmm- does not.

I didn't include an endogenous regressor in this example, but there's
nothing special about including an offset variable that stops you from doing
so.

I hope this helps.

   -- 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index