Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: RE: RE: different results ivregress ivreg2


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: different results ivregress ivreg2
Date   Tue, 23 Oct 2012 20:08:41 +0100

Michael,

It's hard to tell but it looks like you might have scaling/collinearity
problems.  ivregress is omitting the constant and says that the constant
on isc8590 is exactly zero.  ivreg2 uses (I think) different Mata
routines for matrix inversion and may be why it is arriving at different
answers, but I don't know how reliable either of these are.

I suggest you try the following:

(a) Estimate using the undocumented but still working official ivreg,
which is pretty good at dealing with these things.

(b) Do what ivregress says and drop the constant, and see if ivregress
and ivreg2 (and ivreg) agree.

--Mark

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Michael Betz
> Sent: 23 October 2012 14:51
> To: statalist@hsphsun2.harvard.edu
> Subject: st: RE: RE: different results ivregress ivreg2
> 
> Thanks for pointing that out Mark. Sorry about that. What I meant was
the
> coefficient estimates and standard errors are different though the
same
> sample is being used in both estimations. Here is the output I get
> 
> . eststo tsls: ivregress 2sls totpovrt00 totpovrt90 $mining90 $shchg90
$base90
> $full90 (mtmscquan90_00=maxsr1) if arc==1, vce(robust)
> 
> Instrumental variables (2SLS) regression               Number of obs =
417
>                                                        Wald chi2(40)
=44819.44
>                                                        Prob > chi2   =
0.0000
>                                                        R-squared     =
0.9231
>                                                        Root MSE      =
1.7678
> 
>
------------------------------------------------------------------------
----------
>                  |               Robust
>       totpovrt00 |      Coef.   Std. Err.      z    P>|z|     [95%
Conf. Interval]
>
-----------------+------------------------------------------------------
> -----------------+----------
>   mtmscquan90_00 |   .0197637   .0330857     0.60   0.550    -.0450831
.0846105
>       totpovrt90 |   .6417335   .0401982    15.96   0.000     .5629465
.7205205
>   sh_oilandgas90 |  -.0114216   .0534854    -0.21   0.831     -.116251
.0934078
>      sh_othmin90 |  -.0779878   .1107014    -0.70   0.481    -.2949586
.1389829
> sh_oilandgas9000 |  -.0006486   .0008198    -0.79   0.429    -.0022553
.0009582
>    sh_othmin9000 |   .0000284   .0010231     0.03   0.978    -.0019769
.0020337
>     wttotpovrt90 |   .0703972   .0394975     1.78   0.075    -.0070165
.1478109
>        nearmsakm |    .001292   .0048828     0.26   0.791    -.0082782
.0108622
>     incmetgt250k |   .0075248   .0042509     1.77   0.077    -.0008069
.0158565
>     incmetgt500k |   .0018189   .0033364     0.55   0.586    -.0047203
.008358
>    incmetgt1500k |  -.0009213   .0012863    -0.72   0.474    -.0034424
.0015997
>        nmetrop90 |  -1.04e-08   3.05e-07    -0.03   0.973    -6.08e-07
5.87e-07
>       tempgr9095 |  -.0475761   .0134337    -3.54   0.000    -.0739056
-.0212466
>       tempgr9500 |  -.0310936   .0115908    -2.68   0.007    -.0538112
-.008376
>        sinctymsa |   1.235081   .5442064     2.27   0.023     .1684562
2.301706
>         bigmsacc |   .1705238   1.470809     0.12   0.908    -2.712209
3.053257
>        bigmsasub |   .0525589   .6951069     0.08   0.940    -1.309826
1.414943
>       smallmsacc |   1.246925   .5412092     2.30   0.021     .1861748
2.307676
>      smallmsasub |   .1642659   .4547302     0.36   0.718    -.7269889
1.055521
>         msapop90 |   1.74e-07   2.77e-07     0.63   0.530    -3.69e-07
7.17e-07
>            pop90 |  -5.89e-06   4.35e-06    -1.35   0.176    -.0000144
2.64e-06
>    nonmetropop90 |   .0000171   6.19e-06     2.77   0.006     5.02e-06
.0000293
>          isc8590 |          0   .5901839     0.00   1.000    -1.156739
1.156739
>     pop90isc8590 |    .000119   .0000908     1.31   0.190    -.0000589
.0002968
>      ptfor859090 |   .5204261   .5988624     0.87   0.385    -.6533226
1.694175
>      ptfor808590 |   .2481833    .793824     0.31   0.755    -1.307683
1.80405
>        pcthsgr90 |  -.0865189   .0250954    -3.45   0.001     -.135705
-.0373328
>       pctsmcol90 |  -.0884322   .0643579    -1.37   0.169    -.2145715
.0377071
>        pctasso90 |   .0512056   .0876607     0.58   0.559    -.1206061
.2230173
>       pctcolgr90 |    .017978   .0446468     0.40   0.687    -.0695282
.1054842
>       pctfhhwc90 |  -.1243082   .1230761    -1.01   0.312    -.3655329
.1169164
>       pctmhhwc90 |   .1605806   .3118982     0.51   0.607    -.4507286
.7718899
>       pctageu690 |   .0294137   .1492109     0.20   0.844    -.2630344
.3218617
>      pctage71790 |   .3009958   .1147461     2.62   0.009     .0760976
.5258941
>     pctage182490 |   .1295481   .0494469     2.62   0.009      .032634
.2264622
>     pctage606490 |  -.4264594   .2692848    -1.58   0.113     -.954248
.1013292
>      pctage65o90 |   .1548139   .0875984     1.77   0.077    -.0168758
.3265037
>        popaash90 |  -.0003428   .0169835    -0.02   0.984    -.0336298
.0329442
>    popnonaamin90 |  -.1197184   .0359193    -3.33   0.001    -.1901189
-.0493179
>        pophisp90 |   .2976955   .2485536     1.20   0.231    -.1894607
.7848517
>            _cons |          0  (omitted)
>
------------------------------------------------------------------------
----------
> Instrumented:  mtmscquan90_00
> Instruments:   totpovrt90 sh_oilandgas90 sh_othmin90 sh_oilandgas9000
>                sh_othmin9000 wttotpovrt90 nearmsakm incmetgt250k
incmetgt500k
>                incmetgt1500k nmetrop90 tempgr9095 tempgr9500 sinctymsa
> bigmsacc
>                bigmsasub smallmsacc smallmsasub msapop90 pop90
> nonmetropop90
>                isc8590 pop90isc8590 ptfor859090 ptfor808590 pcthsgr90
pctsmcol90
>                pctasso90 pctcolgr90 pctfhhwc90 pctmhhwc90 pctageu690
> pctage71790
>                pctage182490 pctage606490 pctage65o90 popaash90
popnonaamin90
>                pophisp90 maxsr1
> 
> .
> . eststo tsls2: ivreg2 totpovrt00 totpovrt90 $mining90 $shchg90
$base90
> $full90 (mtmscquan90_00=maxsr1) if arc==1, robust
> 
> IV (2SLS) estimation
> --------------------
> 
> Estimates efficient for homoskedasticity only Statistics robust to
> heteroskedasticity
> 
>                                                       Number of obs =
417
>                                                       F( 40,   376) =
109.23
>                                                       Prob > F      =
0.0000
> Total (centered) SS     =  16955.66734                Centered R2   =
0.9240
> Total (uncentered) SS   =  128080.6204                Uncentered R2 =
0.9899
> Residual SS             =  1289.013281                Root MSE      =
1.758
> 
>
------------------------------------------------------------------------
----------
>                  |               Robust
>       totpovrt00 |      Coef.   Std. Err.      z    P>|z|     [95%
Conf. Interval]
>
-----------------+------------------------------------------------------
> -----------------+----------
>   mtmscquan90_00 |   .0338978    .034418     0.98   0.325    -.0335602
.1013559
>       totpovrt90 |    .633344   .0421794    15.02   0.000     .5506738
.7160141
>   sh_oilandgas90 |  -.0041695   .0517569    -0.08   0.936    -.1056112
.0972722
>      sh_othmin90 |  -.1063477   .1144918    -0.93   0.353    -.3307476
.1180521
> sh_oilandgas9000 |  -.0005622   .0008112    -0.69   0.488     -.002152
.0010277
>    sh_othmin9000 |  -.0002268   .0010025    -0.23   0.821    -.0021917
.0017382
>     wttotpovrt90 |   .0699014    .039297     1.78   0.075    -.0071193
.1469222
>        nearmsakm |   .0021653   .0051207     0.42   0.672     -.007871
.0122017
>     incmetgt250k |   .0074402   .0042373     1.76   0.079    -.0008647
.0157451
>     incmetgt500k |    .000783   .0035558     0.22   0.826    -.0061863
.0077523
>    incmetgt1500k |   -.001102   .0013519    -0.82   0.415    -.0037518
.0015477
>        nmetrop90 |   4.39e-08   2.97e-07     0.15   0.883    -5.39e-07
6.27e-07
>       tempgr9095 |  -.0477614   .0130911    -3.65   0.000    -.0734194
-.0221034
>       tempgr9500 |  -.0303755   .0115424    -2.63   0.008    -.0529981
-.0077529
>        sinctymsa |   1.363374   .5410069     2.52   0.012     .3030197
2.423728
>         bigmsacc |   1.746468   1.243426     1.40   0.160    -.6906013
4.183538
>        bigmsasub |   .0791756      .6809     0.12   0.907    -1.255364
1.413715
>       smallmsacc |   1.396968   .5481443     2.55   0.011     .3226254
2.471312
>      smallmsasub |   .2747845   .4587298     0.60   0.549    -.6243094
1.173878
>         msapop90 |   1.82e-07   2.74e-07     0.67   0.506    -3.54e-07
7.18e-07
>            pop90 |  -8.43e-08   4.03e-06    -0.02   0.983    -7.99e-06
7.82e-06
>    nonmetropop90 |   .0000193   6.48e-06     2.98   0.003     6.60e-06
.000032
>          isc8590 |   8.173178   5.650488     1.45   0.148    -2.901575
19.24793
>     pop90isc8590 |  -6.30e-06   .0000837    -0.08   0.940    -.0001704
.0001578
>      ptfor859090 |   .5920391   .6181359     0.96   0.338     -.619485
1.803563
>      ptfor808590 |   .3750986    .783866     0.48   0.632     -1.16125
1.911448
>        pcthsgr90 |  -.0850652    .025138    -3.38   0.001    -.1343347
-.0357956
>       pctsmcol90 |  -.0864964   .0647881    -1.34   0.182    -.2134788
.040486
>        pctasso90 |   .0621457   .0905832     0.69   0.493    -.1153941
.2396855
>       pctcolgr90 |   .0126505   .0435772     0.29   0.772    -.0727592
.0980603
>       pctfhhwc90 |  -.0915021   .1190157    -0.77   0.442    -.3247687
.1417645
>       pctmhhwc90 |   .1458696   .3018003     0.48   0.629    -.4456481
.7373873
>       pctageu690 |   .0175032   .1760583     0.10   0.921    -.3275648
.3625712
>      pctage71790 |   .2436343   .1628621     1.50   0.135    -.0755695
.5628381
>     pctage182490 |   .1149265   .0793779     1.45   0.148    -.0406513
.2705044
>     pctage606490 |  -.5235005   .3160347    -1.66   0.098    -1.142917
.0959162
>      pctage65o90 |   .1614924   .0944564     1.71   0.087    -.0236388
.3466236
>        popaash90 |   .0007198    .018228     0.04   0.968    -.0350064
.0364461
>    popnonaamin90 |  -.1301205    .037705    -3.45   0.001     -.204021
-.0562201
>        pophisp90 |   .2225309   .2507226     0.89   0.375    -.2688763
.7139381
>            _cons |   .9326736   4.561277     0.20   0.838    -8.007266
9.872613
>
------------------------------------------------------------------------
----------
> Underidentification test (Kleibergen-Paap rk LM statistic):
2.411
>                                                    Chi-sq(1) P-val =
0.1205
>
------------------------------------------------------------------------
------
> Weak identification test (Cragg-Donald Wald F statistic):
21.531
>                          (Kleibergen-Paap rk Wald F statistic):
20.958
> Stock-Yogo weak ID test critical values: 10% maximal IV size
16.38
>                                          15% maximal IV size
8.96
>                                          20% maximal IV size
6.66
>                                          25% maximal IV size
5.53
> Source: Stock-Yogo (2005).  Reproduced by permission.
> NB: Critical values are for Cragg-Donald F statistic and i.i.d.
errors.
>
------------------------------------------------------------------------
------
> Hansen J statistic (overidentification test of all instruments):
0.000
>                                                  (equation exactly
identified)
>
------------------------------------------------------------------------
------
> Instrumented:         mtmscquan90_00
> Included instruments: totpovrt90 sh_oilandgas90 sh_othmin90
> sh_oilandgas9000
>                       sh_othmin9000 wttotpovrt90 nearmsakm
incmetgt250k
>                       incmetgt500k incmetgt1500k nmetrop90 tempgr9095
tempgr9500
>                       sinctymsa bigmsacc bigmsasub smallmsacc
smallmsasub
>                       msapop90 pop90 nonmetropop90 isc8590
pop90isc8590
>                       ptfor859090 ptfor808590 pcthsgr90 pctsmcol90
pctasso90
>                       pctcolgr90 pctfhhwc90 pctmhhwc90 pctageu690
pctage71790
>                       pctage182490 pctage606490 pctage65o90 popaash90
>                       popnonaamin90 pophisp90 Excluded instruments:
maxsr1
>
------------------------------------------------------------------------
------
> 
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Schaffer, Mark E
> Sent: Monday, October 22, 2012 5:08 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: RE: different results ivregress ivreg2
> 
> Michael,
> 
> You haven't provided enough details for us to contribute a useful
answer.
> "Different result" can be practically anything!
> 
> --Mark
> 
> > -----Original Message-----
> > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> > statalist@hsphsun2.harvard.edu] On Behalf Of Michael Betz
> > Sent: 22 October 2012 18:47
> > To: statalist@hsphsun2.harvard.edu
> > Subject: st: different results ivregress ivreg2
> >
> > Hi all,
> >
> > I'm using Stata 12.1 and am getting different result for ivregress
and
> ivreg2
> > 2sls. To my understanding they should be equivalent, which makes me
> > believe there is a detail in the estimation of one of them that I am
> missing.
> > My code is below:
> >
> > ivregress 2sls totpovrt00 totpovrt90 $mining90 $shchg90 $base90
> $full90
> > (mtmscquan90_00=maxsr1) if arc==1, vce(robust) first
> >
> > ivreg2 totpovrt00 totpovrt90 $mining90 $shchg90 $base90 $full90
> > (mtmscquan90_00=maxsr1) if arc==1, robust first
> >
> > I started with an extremely parsimonious model which gave me the
same
> > results using both commands. As I added variables, the results began
> to
> > differ. If I add any of the following variables it leads to
different
> results
> > between the two commands.
> >
> >
> > Variable	Obs	Mean		Std. Dev.	Min
> Max
> > isc8590		417	.0693959	.0327513	.0171622
> > 	.279515
> > pop90isc8590	417	2999.111	4974.265	166.3676
> > 	78940.03
> > pctage606490	420	4.802992	.7325087	2.316738
> > 	7.595499
> > pctage65o90	420	14.35169	2.651081	4.709416
> > 	24.75028
> >
> > Thanks,
> > Mike
> >
> >
> >
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/faqs/resources/statalist-faq/
> > *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> -----
> Sunday Times Scottish University of the Year 2011-2013 Top in the UK
for
> student experience Fourth university in the UK and top in Scotland
(National
> Student Survey 2012)
> 
> 
> We invite research leaders and ambitious early career researchers to
join us
> in leading and driving research in key inter-disciplinary themes.
> Please see www.hw.ac.uk/researchleaders for further information and
how
> to apply.
> 
> Heriot-Watt University is a Scottish charity registered under charity
number
> SC000278.
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/


----- 
Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)


We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see www.hw.ac.uk/researchleaders for further information and how
to apply.

Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index