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 on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: Using ivhettest to test for heterogeneity


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Using ivhettest to test for heterogeneity
Date   Fri, 24 Feb 2012 22:49:16 -0000

Andreas,

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 
> andreas.zweifel@uzh.ch
> Sent: 24 February 2012 20:14
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Using ivhettest to test for heterogeneity 
> 
> Dear Statalist users, 
>  
> I am concerned with using White's general heteroskedasticity 
> test when running an instrumental variables regression. There 
> is an option "nr2" which can be used with -ivhettest- after 
> the -ivreg2- command that displays the White-Koenker test 
> statistic.

This is a test of heteroskedasticity in the IV equation (or "2nd stage"
if you prefer).

> However, when I run the first-stage regression 
> manually and use the command "imtest, white", I get a very 
> different value for the test statistic.

Because it's a test of heteroskedasticity in the first-stage regression.

> The help file for -ivhettest- claims that this command can 
> also be used for OLS regressions.

It can; see the example in the help file.  You estimate using OLS
(-regress- or -ivreg2-), then call -ivhettest-.

> But why do the -ivhettest- 
> and -imtest- commands yield different test statistics?

They should be the same.  Estimate using OLS and -regress-, and then
compare -imtest, white- with -ivhettest, ivsq nr2-.  You should get the
same result.  Below is an example using the toy auto dataset.

Cheers,
Mark


. reg mpg weight

      Source |       SS       df       MS              Number of obs =
74
-------------+------------------------------           F(  1,    72) =
134.62
       Model |   1591.9902     1   1591.9902           Prob > F      =
0.0000
    Residual |  851.469256    72  11.8259619           R-squared     =
0.6515
-------------+------------------------------           Adj R-squared =
0.6467
       Total |  2443.45946    73  33.4720474           Root MSE      =
3.4389

------------------------------------------------------------------------
------
         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
      weight |  -.0060087   .0005179   -11.60   0.000    -.0070411
-.0049763
       _cons |   39.44028   1.614003    24.44   0.000     36.22283
42.65774
------------------------------------------------------------------------
------

. imtest, white

White's test for Ho: homoskedasticity
         against Ha: unrestricted heteroskedasticity

         chi2(2)      =      5.89
         Prob > chi2  =    0.0526

Cameron & Trivedi's decomposition of IM-test

---------------------------------------------------
              Source |       chi2     df      p
---------------------+-----------------------------
  Heteroskedasticity |       5.89      2    0.0526
            Skewness |       4.92      1    0.0266
            Kurtosis |       1.70      1    0.1919
---------------------+-----------------------------
               Total |      12.51      4    0.0139
---------------------------------------------------

> Is the 
> -ivhettest- a combined heteroskedasticity test that is 
> computed from individual test statistics of the first-stage 
> and reduced form regression in the case of 2SLS?
>  
> Any help would be greatly appreciated!
>  
> Andreas Zweifel
> *
> *   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/
> 


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

Heriot-Watt University is the Sunday Times
Scottish University of the Year 2011-2012



*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index