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: Using ivhettest to test for heterogeneity


From   [email protected]
To   [email protected]
Subject   st: RE: Using ivhettest to test for heterogeneity
Date   Mon, 27 Feb 2012 09:37:57 +0100

Dear Mark,

Thank you for explaining me the usage of the two different commands.
Unfortunately, I cannot infer whether the two commands give the same 
results from your toy auto example because I miss the -ivhettest- 
command below. But kindly have a look at the following example using
my own dataset. There is a marked difference between the results after
calling -imtest, white- and -ivhettest, ivsq nr2-. I would be happy to
know where this difference must likely come from.


. reg COC DRANK LBAGE D_LBAGE LNMV LNBM LNLEV CapInt ROA AssTr LTG LVOL MAFE if FIN==0 

      Source |       SS       df       MS              Number of obs =      98
-------------+------------------------------           F( 12,    85) =   24.23
       Model |  .156474018    12  .013039502           Prob > F      =  0.0000
    Residual |   .04574489    85  .000538175           R-squared     =  0.7738
-------------+------------------------------           Adj R-squared =  0.7418
       Total |  .202218908    97  .002084731           Root MSE      =   .0232

------------------------------------------------------------------------------
         COC |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       DRANK |  -.2832065   .1170839    -2.42   0.018    -.5160006   -.0504123
       LBAGE |  -.0152769   .0087299    -1.75   0.084    -.0326344    .0020806
     D_LBAGE |    .032221   .0134307     2.40   0.019     .0055172    .0589248
        LNMV |  -.0046663   .0022202    -2.10   0.039    -.0090806    -.000252
        LNBM |   .0030857   .0060793     0.51   0.613    -.0090016     .015173
       LNLEV |   .0093984   .0140586     0.67   0.506    -.0185538    .0373506
      CapInt |  -.0209075   .0201706    -1.04   0.303    -.0610121    .0191972
         ROA |  -.0582245   .0346929    -1.68   0.097    -.1272033    .0107543
       AssTr |  -.0037709   .0039292    -0.96   0.340    -.0115832    .0040414
         LTG |   .0009717   .0000776    12.53   0.000     .0008175     .001126
        LVOL |  -.0011873   .0096773    -0.12   0.903    -.0204284    .0180538
        MAFE |   .0030178   .0005758     5.24   0.000     .0018729    .0041626
       _cons |   .2751544   .0723573     3.80   0.000     .1312886    .4190201
------------------------------------------------------------------------------

. 
end of do-file
. 
. imtest, white

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

         chi2(89)     =     97.10
         Prob > chi2  =    0.2613

Cameron & Trivedi's decomposition of IM-test

---------------------------------------------------
              Source |       chi2     df      p
---------------------+-----------------------------
  Heteroskedasticity |      97.10     89    0.2613
            Skewness |      17.64     12    0.1272
            Kurtosis |       1.82      1    0.1769
---------------------+-----------------------------
               Total |     116.56    102    0.1537
---------------------------------------------------

. ivhettest, ivsq nr2
OLS heteroskedasticity test(s) using levels and squares of IVs
Ho: Disturbance is homoskedastic
    White/Koenker nR2 test statistic    :  58.500  Chi-sq(24) P-value = 0.0001





[email protected] wrote: ----- 
To: <[email protected]>
From: "Schaffer, Mark E" 
Sent by: [email protected]
Date: 02/24/2012 11:51PM
Subject: st: RE: Using ivhettest to test for heterogeneity

Andreas,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> [email protected]
> Sent: 24 February 2012 20:14
> To: [email protected]
> 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/
*
*   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