Announcement

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

  • Test for homoscedasticity (hettest)

    Hi guys

    I would like to perform the Breusch-Pagan test for homoscedasticity. My question is what is the correct method to do this?
    When i run the regression should i just type Hettest so the values are the fitted values of the Y-variable or should i type Hettest X1 X2 X3 etc.?
    Ive seen videoes doing both things, so i am not sure what is correct?

    Thanks a lot in advance

  • #2
    unless you are using a very old version of Stata, neither of the above is correct; see
    Code:
    help regress postestimation##estathett
    if you are using an older version of Stata, then, as the FAQ requests, you should tell us what version you are using

    Comment


    • #3
      Dennis:
      as an aside to Rich's helpful advice, you may want to consider the following toy-example:
      Code:
      sysuse auto.dta
      . regress price mpg
      
            Source |       SS           df       MS      Number of obs   =        74
      -------------+----------------------------------   F(1, 72)        =     20.26
             Model |   139449474         1   139449474   Prob > F        =    0.0000
          Residual |   495615923        72  6883554.48   R-squared       =    0.2196
      -------------+----------------------------------   Adj R-squared   =    0.2087
             Total |   635065396        73  8699525.97   Root MSE        =    2623.7
      
      ------------------------------------------------------------------------------
             price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               mpg |  -238.8943   53.07669    -4.50   0.000    -344.7008   -133.0879
             _cons |   11253.06   1170.813     9.61   0.000     8919.088    13587.03
      ------------------------------------------------------------------------------
      
      . estat hettest
      
      Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
               Ho: Constant variance
               Variables: fitted values of price
      
               chi2(1)      =     7.14
               Prob > chi2  =   0.0075
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment

      Working...
      X