Announcement

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

  • Breusch–Pagan LM (BP LM) Test for Cross Sectional Dependency Test (CSD) of Panel Data

    I am currently working on my dissertation on the impact of institutional quality on greenhouse gas emissions. I am trying to do a panel ardl with 4 countries, and period from 1996-2020. I would like to do a Breusch–Pagan LM test to check the cross sectional dependence of the respective countries.

    The code I used is hettest x1 x2 x3 x4 x5 x6 x7, but this is giving an overall result. I would like to know if anyone knows the proper code to get the BP-LM result for each variable used please.

    Thank you

  • #2
    Thikee:
    you can specify the variable you're interested in investigating the heteroskedastcity of:
    Code:
    . use "C:\Program Files\Stata17\ado\base\a\auto.dta"
    (1978 automobile data)
    
    . regress price mpg trunk
    
          Source |       SS           df       MS      Number of obs   =        74
    -------------+----------------------------------   F(2, 71)        =     10.14
           Model |   141126459         2  70563229.4   Prob > F        =    0.0001
        Residual |   493938937        71  6956886.44   R-squared       =    0.2222
    -------------+----------------------------------   Adj R-squared   =    0.2003
           Total |   635065396        73  8699525.97   Root MSE        =    2637.6
    
    ------------------------------------------------------------------------------
           price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             mpg |  -220.1649   65.59262    -3.36   0.001    -350.9529    -89.3769
           trunk |   43.55851   88.71884     0.49   0.625    -133.3418    220.4589
           _cons |   10254.95   2349.084     4.37   0.000      5571.01    14938.89
    ------------------------------------------------------------------------------
    
    
    . estat hettest
    
    Breusch–Pagan/Cook–Weisberg test for heteroskedasticity 
    Assumption: Normal error terms
    Variable: Fitted values of price
    
    H0: Constant variance
    
        chi2(1) =   7.96
    Prob > chi2 = 0.0048
    
    . estat hettest trunk
    
    Breusch–Pagan/Cook–Weisberg test for heteroskedasticity 
    Assumption: Normal error terms
    Variable: trunk
    
    H0: Constant variance
    
        chi2(1) =   2.19
    Prob > chi2 = 0.1392
    
    
    . estat hettest mpg
    
    Breusch–Pagan/Cook–Weisberg test for heteroskedasticity 
    Assumption: Normal error terms
    Variable: mpg
    
    H0: Constant variance
    
        chi2(1) =   8.20
    Prob > chi2 = 0.0042
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Mr. Carlo Lazzaro for your prompt response. It is much appreciated!
      Kind regards,
      Shaifa

      Comment

      Working...
      X