Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: IVPOIS


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   st: Re: IVPOIS
Date   Wed, 14 Nov 2007 20:10:44 -0500

Someone considering upgrading to Stata 10 asked about -ivpois- versus
-qvf- (both on SSC).  Here is an overly facile comparison loosely
based on -help qvf-:

clear
set obs 1000
gen x1 = uniform()
gen x2 = uniform()
gen x3 = uniform()
gen err = invnorm(uniform())
gen y = exp(1+2*x1+3*x2+4*x3+err)
gen t3 = .8*x3 + .6*invnorm(uniform())
qvf y x1 x2 x3 (x1 x2 t3), link(log) fam(poisson)

IV Generalized linear models                       No. of obs      =      1000
Optimization     : MQL Fisher scoring              Residual df     =       996
                   (IRLS EIM)                      Scale param     =         1
Deviance         =  2132980.786                    (1/df) Deviance =  2141.547
Pearson          =  4230543.623                    (1/df) Pearson  =  4247.534

Variance Function: V(u) = u                        [Poisson]
Link Function    : g(u) = ln(u)                    [Log]
Standard Errors  : OIM Sandwich

------------------------------------------------------------------------------
           y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          x1 |   2.559671   .3487075     7.34   0.000     1.876217    3.243125
          x2 |   3.125296    .335068     9.33   0.000     2.468574    3.782017
          x3 |   2.655257   .9003787     2.95   0.003     .8905473    4.419967
       _cons |   2.244508   .5615547     4.00   0.000     1.143881    3.345135
------------------------------------------------------------------------------

. ivpois y x1 x2, endog(x3) exog(t3)
(running iv_poisson on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
..................................................    50
------------------------------------------------------------------------------
             |              Bootstrap
           y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
y            |
          x1 |    2.07103   .1358507    15.24   0.000     1.804767    2.337292
          x2 |   3.048453   .1090855    27.95   0.000     2.834649    3.262256
          x3 |   4.164278   .4659518     8.94   0.000     3.251029    5.077527
       _cons |   1.307535   .2540709     5.15   0.000     .8095653    1.805505
------------------------------------------------------------------------------
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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