Announcement

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

  • Please Help - The Wald chi2 model statistic has been reported as missing ...

    Hi,
    I use panel regression regression with robust std error but STATA reports the following messages;

    1.The Wald chi2 model statistic has been reported as missing.
    2.corr(u_i, X) = 0 (assumed) >> Is there any problem with the model?
    3.sigma_u and rho are zero
    4.when command e(r2_a) following outreg2, STATA reports to check eret list and I found there's no e(r2_a) in the list. What should I do If I want the Adjusted R2

    Commands and results are in the attachment.

    Many Thanks
    Sara
    Attached Files

  • #2
    Originally posted by Sara Jaa View Post
    What should I do If I want the Adjusted R2
    Maybe:

    1. Don't use xtreg, and

    2. Don't use robust

    You can get adjusted R2 with regress and entering your (fixed effects) panel variable as a factor variable.

    Comment


    • #3
      Welcome to Statalist, Sara.

      In general, posting Word files is discouraged on Statalist, and a substantial number of members either do not have Microsoft products or do not open Microsoft documents from unknown sources. Below I have posted the contents of your attachment in a form readable by everyone.

      For future reference, please review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. See especially sections 9-12 on how to best pose your question. It's particularly helpful to copy commands and output from your Stata Results window and paste them into your Statalist post using CODE delimiters, as I did below, and to use the dataex command to provide sample data, as described in section 12 of the FAQ.

      Code:
      . xtreg ROA IBac IBac2 lnA Loan Dep OBS TRD NPL NII NOE Prov HC PLT FLD, robust
      note: IBac2 omitted because of collinearity
       
      Random-effects GLS regression                   Number of obs      =       200
      Group variable: Bank1                           Number of groups   =        10
       
      R-sq:  within  = 0.3373                         Obs per group: min =        20
             between = 0.9251                                        avg =      20.0
             overall = 0.5745                                        max =        20
       
                                                      Wald chi2(9)       =         .
      corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =         .
       
                                       (Std. Err. adjusted for 10 clusters in Bank1)
      ------------------------------------------------------------------------------
                   |               Robust
               ROA |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
             IBac2 |  -.6349743   .5325246    -1.19   0.233    -1.678703    .4087547
             IBac2 |          0  (omitted)
               lnA |   .1580466   .0396991     3.98   0.000     .0802377    .2358554
              Loan |  -1.432578   1.196068    -1.20   0.231    -3.776829    .9116731
               Dep |   -.859116   .4353156    -1.97   0.048    -1.712319    -.005913
               OBS |   .1319344   .1428143     0.92   0.356    -.1479765    .4118453
               TRD |  -.0953054   .0340292    -2.80   0.005    -.1620013   -.0286094
               NPL |  -13.36173    4.16206    -3.21   0.001    -21.51922   -5.204238
               NII |   359.0665   42.54074     8.44   0.000     275.6881    442.4448
               NOE |  -.1685176   .0704297    -2.39   0.017    -.3065572    -.030478
              Prov |     -100.4   56.21452    -1.79   0.074    -210.5784    9.778461
                HC |   -.225829     .05348    -4.22   0.000    -.3306478   -.1210101
               PLT |   .0838018   .1519869     0.55   0.581    -.2140871    .3816906
               FLD |  -.1073445   .0949364    -1.13   0.258    -.2934165    .0787275
             _cons |  -.6895448   .7503506    -0.92   0.358    -2.160205    .7811154
      -------------+----------------------------------------------------------------
           sigma_u |          0
           sigma_e |  .46590246
               rho |          0   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
       
      . outreg2 using rescale1.doc, replace ctitle(OLS) addstat (Adjusted R-squared, e(r2_a))
      check eret list for the existence of e(r2_a)
      invalid syntax
      r(198);
       
      end of do-file
       
      r(198);
       
      . eret list
       
      scalars:
                  e(N_clust) =  10
                     e(rank) =  9
                     e(df_m) =  9
                     e(chi2) =  .
                        e(p) =  .
                  e(sigma_u) =  0
                  e(sigma_e) =  .4659024606051799
                    e(sigma) =  .4659024606051799
                      e(rho) =  0
                     e(rmse) =  .4859895636219217
                        e(N) =  200
                     e(Tbar) =  20
                     e(Tcon) =  1
                      e(N_g) =  10
                    e(g_min) =  20
                    e(g_avg) =  20
                    e(g_max) =  20
                    e(theta) =  0
                     e(r2_o) =  .5745486554892864
                     e(r2_b) =  .9251134891397371
                     e(r2_w) =  .3373263960345694
       
      macros:
               e(properties) : "b V"
                 e(chi2type) : "Wald"
                   e(depvar) : "ROA"
                  e(vcetype) : "Robust"
                      e(vce) : "robust"
                 e(clustvar) : "Bank1"
                     e(ivar) : "Bank1"
                    e(model) : "re"
                  e(predict) : "xtrere_p"
             e(marginsnotok) : "E U UE SCore STDP XBU"
                      e(cmd) : "xtreg"
                  e(cmdline) : "xtreg ROA IBac IBac2 lnA Loan Dep OBS TRD NPL NII NOE Prov HC PLT FLD, robust"
       
      matrices:
                        e(b) :  1 x 15
                        e(V) :  15 x 15
                       e(bf) :  1 x 15
                     e(VCEf) :  15 x 15
       
      functions:
                   e(sample)

      Comment


      • #4
        Looking at the output posted above, it appears that the xtreg command specified what were supposed to be two distinct independent variables IBac and IBac2. However, Stata did not find IBac and thus treated IBac as an abbreviation for IBac2. This explains why IBac2 appears twice in the coefficients table, the second time dropped due to collinearity.

        A first step toward answering questions 1-3 would be to respecify the model correctly - either omitting IBac, or replacing IBac with the correctly-named variable, or ensuring that IBac is in the dataset, and re-running the xtreg.

        Comment


        • #5
          Sara:
          Joseph and William provided helpul advice.
          I would only add that the missing Wald chi2 statsistic is due to the fact that the number of your constraints (coefficients) is greater than the number of your clusters (see -help j_robustsingular- for more details) .
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Originally posted by Joseph Coveney View Post

            Maybe:

            1. Don't use xtreg, and

            2. Don't use robust

            You can get adjusted R2 with regress and entering your (fixed effects) panel variable as a factor variable.
            Dear Joseph,

            To get adjusted r2, I have no idea how to use regress command and entering panel variables as a factor variable? I wonder, if I use the plain "regress y x" command to get the plain OLS estimates using the panel data I have, will that regression be correct? Or do I need to instruct Stata with a special command to run the plain OLS using my panel data?

            Best regards,
            Sara

            Comment


            • #7
              Sara:
              a missing Wald chi2 model statistic is also a warning about rethinking your regression model.
              In your cae, it seems that you're asking too much out of your data inn terms of clusters and coefficients (see -help j_robustsingular- for more details).
              Kind regards,
              Carlo
              (StataNow 18.5)

              Comment


              • #8
                Originally posted by Sara Jaa View Post
                To get adjusted r2, I have no idea how to use regress command and entering panel variables as a factor variable?
                Code:
                regress ROA /* IBac */ IBac2 lnA Loan Dep OBS TRD NPL NII NOE Prov HC PLT FLD i.Bank1
                I'm not sure that the Adjusted R2 that you get will be what you want, though, because it includes the indicator variables for your grouping variable (Bank1). Perhaps that's why xtreg doesn't report Adjusted R2.

                Comment


                • #9
                  I'm not sure that the Adjusted R2 that you get will be what you want, though, because it includes the indicator variables for your grouping variable (Bank1). Perhaps that's why xtreg doesn't report Adjusted R2.

                  Joseph makes an important point about the adjusted R2 statistic in -xtreg, fe- with the inclusion of the firm dummies available as r2_a after typing ereturn list. It is meaningless (and in a lot of cases negative). However, there are instances where you may have quite a large number of regressors in your model and may want to compare the within R2 to the within adjusted R2 not including the firm dummies. You should use the following formula after -xtreg- to obtain the appropriate adjusted R2:

                  Code:
                  scalar R2_a = e(r2_w) - ((1- e(r2_w))* (e(df_b) / (e(N)-e(df_b)-1)))
                  di R2_a

                  The justification is simple: the within R2 is the R2 statistic from the regression of the within-mean deviated variables. The same regression reports an adjusted R2 which adjusts for addition of variables into the model. The following example using the Grunfeld dataset illustrates:

                  Code:
                  webuse grunfeld
                  xtreg invest mvalue kstock, fe
                  scalar R2_a = e(r2_w) - ((1- e(r2_w))* (e(df_b) / (e(N)-e(df_b)-1)))
                  di R2_a    
                  
                  *\\generate within-means of variables
                  local vars "invest mvalue kstock"
                  foreach x of local vars{
                  bys company: egen `x'm= mean(`x')
                  }
                  
                  *\\generate mean-deviated variables
                  foreach x of local vars{
                  gen `x'd= `x'm-`x'
                  }
                  
                  reg investd mvalued kstockd
                  Output:

                  Code:
                  . xtreg invest mvalue kstock, fe
                  
                  Fixed-effects (within) regression               Number of obs     =        200
                  Group variable: company                         Number of groups  =         10
                  
                  R-sq:                                           Obs per group:
                       within  = 0.7668                                         min =         20
                       between = 0.8194                                         avg =       20.0
                       overall = 0.8060                                         max =         20
                  
                                                                  F(2,188)          =     309.01
                  corr(u_i, Xb)  = -0.1517                        Prob > F          =     0.0000
                  
                  ------------------------------------------------------------------------------
                        invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                        mvalue |   .1101238   .0118567     9.29   0.000     .0867345    .1335131
                        kstock |   .3100653   .0173545    17.87   0.000     .2758308    .3442999
                         _cons |  -58.74393   12.45369    -4.72   0.000    -83.31086     -34.177
                  -------------+----------------------------------------------------------------
                       sigma_u |  85.732501
                       sigma_e |  52.767964
                           rho |  .72525012   (fraction of variance due to u_i)
                  ------------------------------------------------------------------------------
                  F test that all u_i=0: F(9, 188) = 49.18                     Prob > F = 0.0000
                  
                  . 
                  . scalar R2_a = e(r2_w) - ((1- e(r2_w))* (e(df_b) / (e(N)-e(df_b)-1)))
                  
                  . 
                  . di R2_a    
                  .76438965
                  
                  
                  . reg investd mvalued kstockd
                  
                        Source |       SS           df       MS      Number of obs   =       200
                  -------------+----------------------------------   F(2, 197)       =    323.81
                         Model |   1720874.1         2   860437.05   Prob > F        =    0.0000
                      Residual |  523478.127       197  2657.24938   R-squared       =    0.7668
                  -------------+----------------------------------   Adj R-squared   =    0.7644
                         Total |  2244352.23       199  11278.1519   Root MSE        =    51.549
                  
                  ------------------------------------------------------------------------------
                       investd |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                       mvalued |   .1101238   .0115827     9.51   0.000     .0872818    .1329658
                       kstockd |   .3100653   .0169534    18.29   0.000     .2766318    .3434989
                         _cons |  -1.93e-08    3.64503    -0.00   1.000    -7.188288    7.188288
                  ------------------------------------------------------------------------------

                  Comment


                  • #10
                    I am really appreciate with your advises, Thank you so much

                    Best regards,
                    Sara

                    Comment

                    Working...
                    X