Announcement

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

  • Robust SE test in Panel data "Random Effect Model"?


    Dears,
    Kindly find my output of the random effect model after determining it by Hausman test.

    Iam doing the data test needed like (Hetero,Auto etc) and I found that I have Auto-correlation problem, so I checked for the Cluster robust SE test, however I can not interpret the output of this test.

    Another point, I want to test for Heteroskedasticity for Random effect.
    And finally what are the expected and needed tests for my model.


    Tags: None

  • #2
    Abdelmoneam:
    your attachments (by the way: please share what you typed and what Stata gave you back via CODE delimiters and/or data example/excerpt via -dataex-; see the FAQ on these and other posting-related topics. Thanks) are not attached, actually.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dears,
      Kindly find my output of the random effect model after determining it by Hausman test.

      Iam doing the data test needed like (Hetero,Auto etc) and I found that I have Auto-correlation problem, so I checked for the Cluster robust SE test, however I can not interpret the output of this test.

      Another point, I want to test for Heteroskedasticity for Random effect.
      And finally what are the expected and needed tests for my model.



      . xtreg logTotal INS INFO Fopen Topen Diff INF GDP CC,re

      Random-effects GLS regression Number of obs = 150
      Group variable: Country1 Number of groups = 10

      R-sq: Obs per group:
      within = 0.1557 min = 15
      between = 0.4881 avg = 15.0
      overall = 0.4633 max = 15

      Wald chi2(8) = 73.45
      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

      ------------------------------------------------------------------------------
      logTotal | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      INS | -.6317093 .2410946 -2.62 0.009 -1.104246 -.1591727
      INFO | -.0294963 .012743 -2.31 0.021 -.0544721 -.0045205
      Fopen | -.2053808 .1235719 -1.66 0.097 -.4475772 .0368156
      Topen | -.0080162 .0047028 -1.70 0.088 -.0172335 .0012012
      Diff | .0019685 .0079653 0.25 0.805 -.0136433 .0175802
      INF | -.0337759 .0224268 -1.51 0.132 -.0777317 .0101798
      GDP | -.0013678 .0051221 -0.27 0.789 -.0114069 .0086712
      CC | 4.537129 .7135425 6.36 0.000 3.138612 5.935647
      _cons | 9.542764 1.962833 4.86 0.000 5.695682 13.38985
      -------------+----------------------------------------------------------------
      sigma_u | .41088547
      sigma_e | .54630694
      rho | .36129845 (fraction of variance due to u_i)
      ------------------------------------------------------------------------------




      . xtreg logTotal INS INFO Fopen Topen Diff INF GDP CC,re vce(cluster Country1) theta

      Random-effects GLS regression Number of obs = 150
      Group variable: Country1 Number of groups = 10

      R-sq: Obs per group:
      within = 0.1557 min = 15
      between = 0.4881 avg = 15.0
      overall = 0.4633 max = 15

      Wald chi2(8) = 1732.13
      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
      theta = .67530324

      (Std. Err. adjusted for 10 clusters in Country1)
      ------------------------------------------------------------------------------
      | Robust
      logTotal | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      INS | -.6317093 .4718317 -1.34 0.181 -1.556482 .2930638
      INFO | -.0294963 .0160755 -1.83 0.067 -.0610036 .002011
      Fopen | -.2053808 .2510108 -0.82 0.413 -.697353 .2865913
      Topen | -.0080162 .0086158 -0.93 0.352 -.0249028 .0088705
      Diff | .0019685 .0036999 0.53 0.595 -.0052832 .0092202
      INF | -.0337759 .0410913 -0.82 0.411 -.1143134 .0467616
      GDP | -.0013678 .0028828 -0.47 0.635 -.0070181 .0042824
      CC | 4.537129 1.555989 2.92 0.004 1.487448 7.586811
      _cons | 9.542764 3.982039 2.40 0.017 1.738111 17.34742
      -------------+----------------------------------------------------------------
      sigma_u | .41088547
      sigma_e | .54630694
      rho | .36129845 (fraction of variance due to u_i)
      ------------------------------------------------------------------------------

      Comment


      • #4
        Dears,
        Kindly find my output of the random effect model after determining it by Hausman test.

        Iam doing the data test needed like (Hetero,Auto etc) and I found that I have Auto-correlation problem, so I checked for the Cluster robust SE test, however I can not interpret the output of this test.

        Another point, I want to test for Heteroskedasticity for Random effect.
        And finally what are the expected and needed tests for my model.
        Code:
         xtreg logTotal INS INFO Fopen Topen Diff INF GDP CC,re
        
        Random-effects GLS regression                   Number of obs     =        150
        Group variable: Country1                        Number of groups  =         10
        
        R-sq:                                           Obs per group:
             within  = 0.1557                                         min =         15
             between = 0.4881                                         avg =       15.0
             overall = 0.4633                                         max =         15
        
                                                        Wald chi2(8)      =      73.45
        corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
        
        ------------------------------------------------------------------------------
            logTotal |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 INS |  -.6317093   .2410946    -2.62   0.009    -1.104246   -.1591727
                INFO |  -.0294963    .012743    -2.31   0.021    -.0544721   -.0045205
               Fopen |  -.2053808   .1235719    -1.66   0.097    -.4475772    .0368156
               Topen |  -.0080162   .0047028    -1.70   0.088    -.0172335    .0012012
                Diff |   .0019685   .0079653     0.25   0.805    -.0136433    .0175802
                 INF |  -.0337759   .0224268    -1.51   0.132    -.0777317    .0101798
                 GDP |  -.0013678   .0051221    -0.27   0.789    -.0114069    .0086712
                  CC |   4.537129   .7135425     6.36   0.000     3.138612    5.935647
               _cons |   9.542764   1.962833     4.86   0.000     5.695682    13.38985
        -------------+----------------------------------------------------------------
             sigma_u |  .41088547
             sigma_e |  .54630694
                 rho |  .36129845   (fraction of variance due to u_i)
        -----------------------------------------------------------------
        Code:
         xtreg logTotal INS INFO Fopen Topen Diff INF GDP CC,re vce(cluster Country1) theta
        
        Random-effects GLS regression                   Number of obs     =        150
        Group variable: Country1                        Number of groups  =         10
        
        R-sq:                                           Obs per group:
             within  = 0.1557                                         min =         15
             between = 0.4881                                         avg =       15.0
             overall = 0.4633                                         max =         15
        
                                                        Wald chi2(8)      =    1732.13
        corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
        theta          = .67530324
        
                                      (Std. Err. adjusted for 10 clusters in Country1)
        ------------------------------------------------------------------------------
                     |               Robust
            logTotal |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 INS |  -.6317093   .4718317    -1.34   0.181    -1.556482    .2930638
                INFO |  -.0294963   .0160755    -1.83   0.067    -.0610036     .002011
               Fopen |  -.2053808   .2510108    -0.82   0.413     -.697353    .2865913
               Topen |  -.0080162   .0086158    -0.93   0.352    -.0249028    .0088705
                Diff |   .0019685   .0036999     0.53   0.595    -.0052832    .0092202
                 INF |  -.0337759   .0410913    -0.82   0.411    -.1143134    .0467616
                 GDP |  -.0013678   .0028828    -0.47   0.635    -.0070181    .0042824
                  CC |   4.537129   1.555989     2.92   0.004     1.487448    7.586811
               _cons |   9.542764   3.982039     2.40   0.017     1.738111    17.34742
        -------------+----------------------------------------------------------------
             sigma_u |  .41088547
             sigma_e |  .54630694
                 rho |  .36129845   (fraction of variance due to u_i)
        -------------------------------------------------------------------------

        Comment


        • #5
          Abdelmoneam:
          as -hausman- does not support non-default standard errors, you have probably tested -fe- and -re- specifications with default standard errors, obtained -hausman- outcome and then added clustered robust standard errors. This approach is not correct.
          You should have used the community-contributed command -xtoverid- to check whether the -re- specification was right for your data.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Thank you Carlo,

            the output of the command -xtoverid is
            Code:
             
            xtoverid
            
            Test of overidentifying restrictions: fixed vs random effects
            Cross-section time-series model: xtreg re  robust cluster(Country1)
            Sargan-Hansen statistic  2.8e+04  Chi-sq(8)   P-value = 0.0000
            So, FE is the appropriate model?

            Comment


            • #7
              Yes.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                thank you, could you tell me what is the next step ?

                Comment


                • #9
                  Abdelmoneam:
                  asd per -xtoverid- outcome, go -fe- .
                  If you have already invoked cluster robust standard errors, they take both heteroskedasticity and/or autocorrelation into account (just a side note: your number of cluster is probably a bit small to make non-default standard errors work efficiently).
                  More substantively, you should (have) checked whether your model gives a fair and true view of the data generating process.
                  To investigate this issue, you can consider the following toy-example:
                  Code:
                  . use "http://www.stata-press.com/data/r15/nlswork.dta"
                  (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
                  
                  . xtreg ln_wage age, fe robust
                  
                  Fixed-effects (within) regression               Number of obs     =     28,510
                  Group variable: idcode                          Number of groups  =      4,710
                  
                  R-sq:                                           Obs per group:
                       within  = 0.1026                                         min =          1
                       between = 0.0877                                         avg =        6.1
                       overall = 0.0774                                         max =         15
                  
                                                                  F(1,4709)         =     884.05
                  corr(u_i, Xb)  = 0.0314                         Prob > F          =     0.0000
                  
                                               (Std. Err. adjusted for 4,710 clusters in idcode)
                  ------------------------------------------------------------------------------
                               |               Robust
                       ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                           age |   .0181349   .0006099    29.73   0.000     .0169392    .0193306
                         _cons |   1.148214   .0177153    64.81   0.000     1.113483    1.182944
                  -------------+----------------------------------------------------------------
                       sigma_u |  .40635023
                       sigma_e |  .30349389
                           rho |  .64192015   (fraction of variance due to u_i)
                  ------------------------------------------------------------------------------
                  
                  . predict fitted, xb
                  (24 missing values generated)
                  
                  . g sq_fitted=fitted^2
                  (24 missing values generated)
                  
                  . xtreg ln_wage fitted sq_fitted, fe rob
                  
                  Fixed-effects (within) regression               Number of obs     =     28,510
                  Group variable: idcode                          Number of groups  =      4,710
                  
                  R-sq:                                           Obs per group:
                       within  = 0.1087                                         min =          1
                       between = 0.1006                                         avg =        6.1
                       overall = 0.0865                                         max =         15
                  
                                                                  F(2,4709)         =     507.42
                  corr(u_i, Xb)  = 0.0440                         Prob > F          =     0.0000
                  
                                               (Std. Err. adjusted for 4,710 clusters in idcode)
                  ------------------------------------------------------------------------------
                               |               Robust
                       ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                        fitted |   7.143466    .738485     9.67   0.000      5.69569    8.591242
                     sq_fitted |  -1.816243   .2188485    -8.30   0.000    -2.245289   -1.387198
                         _cons |  -5.167788   .6209677    -8.32   0.000    -6.385175   -3.950401
                  -------------+----------------------------------------------------------------
                       sigma_u |   .4039153
                       sigma_e |  .30245467
                           rho |  .64073314   (fraction of variance due to u_i)
                  ------------------------------------------------------------------------------
                  
                  . test sq_fitted
                  
                   ( 1)  sq_fitted = 0
                  
                         F(  1,  4709) =   68.87
                              Prob > F =    0.0000
                  *As -test- outcome reaches statistical significance, the model is ill-specified*
                  See also -linktest- entry in Stata .pdf manual.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    Thank you for your quick response,

                    Actually, my supervisor asked me to check for Stationarity " Unite root test" but my problem is that I cant determine the lag length in panel data set.
                    So, please suggest me a test to determine the number of lags.

                    thank you again for your help

                    Comment

                    Working...
                    X