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]

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


From   David Ward <[email protected]>
To   [email protected]
Subject   Re: st: RE: -gmm- and incorporate offset/exposure variable?
Date   Tue, 11 Jan 2011 22:13:33 -0500

Brian,
Thanks so much for replying --  so quickly and with a helpful example.
 I now see that it is really straightforward to incorporate the offset
variable in -gmm-.
Thanks!
Dave Ward

On Tue, Jan 11, 2011 at 6:48 PM, Brian P. Poi <[email protected]> wrote:
> 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/
>

*
*   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