Announcement

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

  • Robust Standard Errors how to get value for Wald Chi^2?

    Hello everyone!

    I am running panel data regressions and am using the 'robust' command as I think my model has heteroskedasticity (I am not sure but when I use the robust command, most of my p-values decrease considerably so I think I should be using 'robust', as it makes my coefficients significant).

    Unfortunately, by using 'robust' I do not get any values for Wald Chi(2) and prob>chi(2), which I need.

    One last question: I am running a fixed effect model (where governance captures country fixed effects) but my tables indicates "random-effects GLD regression" does this matter?


    Here is my model without the robust command, followed with the one using the robust command. Just to put into context, I am using dummy variables for my three countries, and time lags.

    I really appreciate your help as I am new with Stata and am a bit overwhelmed with econometric textbooks,

    thank you very much.


    Fred Nolan.

    Click image for larger version

Name:	Screen Shot 2021-10-31 at 11.08.58.png
Views:	1
Size:	95.0 KB
ID:	1634013

    Click image for larger version

Name:	Screen Shot 2021-10-31 at 11.09.02.png
Views:	1
Size:	98.9 KB
ID:	1634012

  • #2
    I guess you have a country-level panel data with three countries where one has 16 years and the other two have 18 years. You'd like to run a fixed-effect model with robust SE.

    Your model is not right. Controlling for "governance", which I guess stores original country IDs, is not capturing country fixed effects -- "i.governance" does. But when you use "xtreg", simply add "fe" option (at the same time dropping "governance" from the regression) for FE estimation. Further, "robust" is usually necessary for your case. Wald statistic is missing probably because the variance-covariance matrix is singular (that's why degree of freedom reduces from 9 to 2).

    Comment


    • #3
      Thank for your reply Fei.

      I set xtset Country year, where Country is a dummy variable, so that my Country captures my country ID.
      I thought that if I added governance indicators for each country that would be enough to capture country-specific effects, I don't actually need a "fixed effect model" I don't think.
      About the data, I have 17 years for every country, so I am unsure why the average is 17.3 ...

      What can I do to get a statistic such as Wald Statistic, F- value ? I need this to check whether my model is significant, whether the explanatory variables I use are jointly significant and provide a better fit than a model that contains no independent variables.
      Could I use the Wald Chi (2) value presented in the models without the robust command or would that be wrong? It doesn't seem right to do that but since the coefficients do not vary maybe I can?

      What about sigma_e ? I am not sure how to interpret it, but is it relevant in my case?


      Thank you for your help !

      Comment


      • #4
        Originally posted by NOLAN FIVE View Post
        Thank for your reply Fei.

        I set xtset Country year, where Country is a dummy variable, so that my Country captures my country ID.
        I thought that if I added governance indicators for each country that would be enough to capture country-specific effects, I don't actually need a "fixed effect model" I don't think.

        About the data, I have 17 years for every country, so I am unsure why the average is 17.3 ...

        What can I do to get a statistic such as Wald Statistic, F- value ? I need this to check whether my model is significant, whether the explanatory variables I use are jointly significant and provide a better fit than a model that contains no independent variables.
        Could I use the Wald Chi (2) value presented in the models without the robust command or would that be wrong? It doesn't seem right to do that but since the coefficients do not vary maybe I can?

        What about sigma_e ? I am not sure how to interpret it, but is it relevant in my case?


        Thank you for your help !
        1. If variable "Country" records country ID (btw, it can't be a dummy variable if you have three countries.), either "reg Y X i.Country" or "xtreg Y X, fe" indicates country fixed-effects estimation. Controlling for "governance" is your choice, but it's NOT capturing country fixed-effects (so your description in #1 is not correct.).

        2. Please double-check the number of years for each country. Results in #1 imply that for some country, you have 16 years, for some 18 years. Check if there are data errors.

        3. To test the joint significance of some or all coefficients, try using "test" command after "xtreg".

        Comment


        • #5
          Nolan:
          1) as far as the missing Wald chi2 and related -p-value- are concerned, please see -help j_robustsingular-;
          2) default or non-default standard errors (which, like Fei, I would recommend) have no bearing on missing -sigma_u- and related -rho-.
          As you went -re- in your regression, I would test the evidence of a panel-wise effect via -xttest0-.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Dear Carlo and Fei,

            Thank you for your advice.

            Fei, you were correct about my data, I had missing values because I created time lags for certain variables. But I have sorted this problem and now have 18 observations for each country.
            I thought Country was a dummy variable as I wrote: tab Country, gen(dum)
            rename dum1 Ghana
            rename dum2 Nigeria
            rename dum3 Tanzania
            Is that not correct?

            About using the robust command, I would rather not use it so that I get my Wald Chi values etc... but I am unsure whether or not I have heteroskedasticity. I have tried looking at my standard errors but I cannot identify heteroskedasticity or homoskedasticity.

            Is this graph sufficient to identify the problem?
            Click image for larger version

Name:	Screen Shot 2021-10-31 at 11.54.45.png
Views:	1
Size:	34.7 KB
ID:	1634137


            Carlo, here is the result to xttest0, I am unsure about how to interpret these results
            Click image for larger version

Name:	Screen Shot 2021-11-01 at 10.52.30.png
Views:	1
Size:	32.8 KB
ID:	1634138


            I thank you both sincerely for your time,

            Nolan.

            Comment


            • #7
              Nolan, it's correct to have Ghana, Nigeria, and Tanzania, three dummy variables. But you need to control for two of the three dummies to capture country fixed effects, and your OP results show that you only include Ghana. Actually it's unnecessary to do so, just running "xtreg Y X, fe" will capture the country FE. In your panel data, there is almost surely serial correlation in the time dimension, and some sort of robust SE is necessary.

              Comment


              • #8
                Nolan:
                1) the Wald chi2 test is not that relevant, as it simply states that, taken together, your predictors reach statistical significance (i.e., are more informative) than the mean of the regressand. Therefore, you can safely live without it.
                2) It would be wrong to report the Wald chi2 statistic but ignoring the apparent heteoskedasticity of your epsilon error. Hence, go -robust- (or -vce(cluster clusterid)- under -xtreg-;
                3) as suspected, the -xttest0- outcome tells yiou that there's no evidence of a panel-wise effect. Hence, you should go pooled OLS with clustered standard errors, as your observations are not independent at panel level;
                4) eventually, you have a N<T panel dataset. Hence, you should not have used -xtreg-, but -xtgls- or -xtregar-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  BTW, Nolan, for your case (small N and small T, but T > N), some general discussions are in https://www.statalist.org/forums/for...-t-and-small-n. Wooldridge suggests using user-written command -xtscc- with both country and year FEs. By default, it calculates some kind of robust SE.

                  Comment


                  • #10
                    Thank you both for your responses.
                    I am still unsure which type of regressions I should be using: OLS with clustered errors, xtscc or xtgls? I have attached the results for Tanzania.




                    Click image for larger version

Name:	Screen Shot 2021-11-01 at 12.33.35.png
Views:	1
Size:	76.5 KB
ID:	1634161


                    Click image for larger version

Name:	Screen Shot 2021-11-01 at 13.16.43.png
Views:	1
Size:	83.8 KB
ID:	1634162



                    Click image for larger version

Name:	Screen Shot 2021-11-01 at 13.23.36.png
Views:	1
Size:	93.2 KB
ID:	1634163

                    Comment


                    • #11
                      Nolan, first, include both Ghana and Tanzania. You have three countries, and include two of the dummies. Second, you may need to control for year dummies for -xtscc-.

                      Code:
                      tab year, generate(y)
                      You will have many dummies, y1, y2, .... Control for all of them except one (any one is ok).

                      Comment


                      • #12
                        Nolan:
                        1) your -xtgls- code ignore heteroskedasticity; hence, standard errors and related stuff are unreliable;
                        2) all regression report sky-rocketing R-sq or Wald chi2. This may mean that you've overfitting. Take a look at -estat vce, corr- and see whether there's an issue in this respect;
                        3) that said, with 18 T vs 3 N, -xtscc- regression is probably the way to go (after fixing what should be fixed).
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          Thanks Fei,

                          I thought that by adding the name of one country 'e.g. Tanzania' it gave me the results for that country only, which is what I want. When I put Ghana and Tanzania together, then which country are those results for?
                          I have added year dummies and controlled for all of them except one, what should I be looking out for?

                          Comment


                          • #14
                            Dear Carlo,

                            The -estat vce, corr- does not seem to reveal any strong correlation (I think)? a part from GDP and GDP-squared which makes sense.
                            Click image for larger version

Name:	Screen Shot 2021-11-01 at 13.54.53.png
Views:	1
Size:	50.3 KB
ID:	1634173

                            Comment


                            • #15
                              Nolan:
                              whaht if you remove -governance- (corr=0.9811 with -logpop-).
                              As an aside, please use CODE delimiters instead of screenshots, for reasons well explained in the FAQ. Thanks.
                              Last edited by Carlo Lazzaro; 01 Nov 2021, 08:03.
                              Kind regards,
                              Carlo
                              (Stata 19.0)

                              Comment

                              Working...
                              X