Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use hettest for heteroskedasticity testing

    Hi all,

    I have a regression and want to test it for heteroskedasticity. Besides the dependent variable, the regression contains one explanatory variable that I want to check for significance and several control variables (that I'm not interested in in itself). My question is whether I have to include all controls in the hettest or whether it is sufficient when I only include the variable that I want to check for significance. Help would be great!

  • #2
    Dominic:
    there's no hard and fast rule about your query.
    I usually go -estat hettest-, just to have a comprehensive picture.
    Plotting residuals (see -help rvfplot- and -help -rvpplot-) can also be helpful (and sometimes much more helpful) than analytic tests.
    That said, you can also test heteroskedasticity on an unique predictor via -estat szroeter-.
    Eventually, you can also perform a decomposition test (see -help imtest-):
    Code:
    . sysuse auto.dta
    
    . regress price mpg i.foreign
    
          Source |       SS           df       MS      Number of obs   =        74
    -------------+----------------------------------   F(2, 71)        =     14.07
           Model |   180261702         2  90130850.8   Prob > F        =    0.0000
        Residual |   454803695        71  6405685.84   R-squared       =    0.2838
    -------------+----------------------------------   Adj R-squared   =    0.2637
           Total |   635065396        73  8699525.97   Root MSE        =    2530.9
    
    ------------------------------------------------------------------------------
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             mpg |  -294.1955   55.69172    -5.28   0.000    -405.2417   -183.1494
                 |
         foreign |
        Foreign  |   1767.292    700.158     2.52   0.014     371.2169    3163.368
           _cons |   11905.42   1158.634    10.28   0.000     9595.164    14215.67
    ------------------------------------------------------------------------------
    
    . estat hettest
    
    Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
             Ho: Constant variance
             Variables: fitted values of price
    
             chi2(1)      =     3.81
             Prob > chi2  =   0.0510
    
    . estat szroeter mpg
    
    Szroeter's test for homoskedasticity
    
        Ho: variance constant
        Ha: variance monotonic in mpg
    
             chi2(1)      =     8.05
             Prob > chi2  =   0.0046
    
    . estat szroeter foreign
    
    Szroeter's test for homoskedasticity
    
        Ho: variance constant
        Ha: variance monotonic in foreign
    
             chi2(1)      =     1.86
             Prob > chi2  =   0.1725
    
    . estat imtest
    
    Cameron & Trivedi's decomposition of IM-test
    
    ---------------------------------------------------
                  Source |       chi2     df      p
    ---------------------+-----------------------------
      Heteroskedasticity |       5.26      4    0.2618
                Skewness |       5.26      2    0.0722
                Kurtosis |       1.27      1    0.2590
    ---------------------+-----------------------------
                   Total |      11.79      7    0.1077
    ---------------------------------------------------
    As an aside, please note that in some instances heteroskedasticity warns us about model misspecification (whisc is much more severe).
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X