Announcement

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

  • R2 and F-statistic do not show when having robust standard errors

    Hello,

    I have an issue with my regressions and F-tests. When i include robust standard errors, the R2 in the regression and the F-statistic in the F-test do not show. It is just a dot in the table. How do I solve this?

    This is what I type into the command box for my final column for the regression:

    qui xtreg g_gdp length g_prim1 g_death patent1 polity2 length_g_prim1 length_g_death length_patent1 length_polity2 g_gov_con g_trade g_pop initial_gdp i.year if (country == "Benin" | country == "Burkina Faso" | country == "Congo" | country == "Algeria" | country == "Gabon" | country == "Kenya" | country == "Algeria" | country == "Gabon" | country == "Kenya" | country == "Madagascar" | country == "Niger" | country == "Togo") & inrange(length, 1, 42), vce(robust) fe
    qui outreg using Table3.doc, nocons addrow(Country-fixed effects,YES \ Year-fixed effects,YES \ Time trend,NO) se bdec (3) starlevels(10 5 1) sigsymbols(*,**,***) starloc(1) summstat(r2 \ N) summtitle(R-squared \ Observations) summdec(2 2 0) title(Table 3. \ The Relationship between Social Infrastructure and Economic Growth \ Dependent Variable: GDP Growth) ctitle("", "" \ "Explanatory Variables" \ "" "(4)") note(NOTE- Robust standard errors are used in parenthesis. The coefficient estimates for country-fixed effects and year-fixed effects are not reported to save space. When performing an additional regression including a time trend, the coefficients are the same as in regression 4 (not reported to save space). \ * Significantly different from zero at 90 percent confidence. \ ** Significantly different from zero at 95 percent confidence. \ *** Significantly different from zero at 99 percent confidence.) blankrows nolegend varlabels replace merge



    I am very thankful for any help regarding this.

  • #2
    You need as many clusters as you have parameters to be estimated to be able to calculate the F-statistic. The absence of an F-statistic is not in itself a problem. Read more on this at

    Code:
    help j_robustsingular
    Also, it appears that you are clustering at the country level. 12 clusters are not enough, the bias from clustering outweighs any gains. You may want to look at wild cluster bootstrap.

    Code:
    ssc install boottest, replace
    help boottest
    Last edited by Andrew Musau; 30 Dec 2022, 14:37.

    Comment


    • #3
      Thank you for your response.

      I am still not sure about what I should do. Do I switch out vce(robust) to boottest? I tried doing that, but I still get no R2 in the regression and no F-statistic.

      Comment


      • #4
        You won't be able to calculate the F-statistic if the number of clusters is less than the number of parameters to be estimated, as I stated in #2. If anyone asks for these, just explain this to them. The suggestion for wild cluster bootstrap is just to help with clustering in the presence of a small number of clusters. Otherwise, just don't cluster and you may be able to calculate the F-statistic of joint significance. But your results won't be robust to heteroscedasticity or serial correlation.
        Last edited by Andrew Musau; 30 Dec 2022, 16:16.

        Comment


        • #5
          Sophie:
          as an aside to Andrew's excellent guidance, please take a look at -help j_robustsingular-. Thanks.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            I don't quite understand. What do you mean by clusters? Is it the number of countries?

            Comment


            • #7
              If you specify -vce(robust)- in xtreg, the clustering variable is the panel identifier in your xtset command. So in this case, country. See https://cameron.econ.ucdavis.edu/res...5_February.pdf which provides an overview on cluster-robust inference.
              Last edited by Andrew Musau; 14 Jan 2023, 05:58.

              Comment


              • #8
                Thank you for your response!

                Comment


                • #9
                  I am still having issues with these. I do not understand why I cannot get a R2 when I type in:

                  qui xtreg g_gdp length g_prim1 g_death patent1 polity2 g_gov_con g_trade g_pop initial_gdp if (country == "Benin" | country == "Burkina Faso" | country == "Congo" | country == "Algeria" | country == "Gabon" | country == "Kenya" | country == "Algeria" | country == "Gabon" | country == "Kenya" | country == "Madagascar" | country == "Niger" | country == "Togo") & inrange(length, 1, 42), vce(robust)
                  qui outreg using Table3.doc, nocons addrow(Country-fixed effects,NO \ Year-fixed effects,NO) se bdec (3) starlevels(10 5 1) sigsymbols(*,**,***) starloc(1) summstat(r2 \ N) summtitle(R-squared \ Observations) summdec(2 2 0) title(Table 3. \ The Relationship between Social Infrastructure and Economic Growth \ Dependent Variable: GDP Growth) ctitle("", "" \ "Explanatory Variables" \ "" "(1)") blankrows nolegend varlabels replace


                  It is just a dot where the R2 should be. I would really appreciate advise on how to solve this.

                  Comment


                  • #10
                    Sophie:
                    could you please share the outcome table of your -xtreg,re- code? Thanks.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Yes
                      Attached Files

                      Comment


                      • #12
                        Sophie:
                        sorry for the confusion.
                        I meant the outcome table that Stata gave you back, that you can share via CODE delimters. Thanks.
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          I don't understand where I can find that

                          Comment


                          • #14
                            I can get the R2 if I add FE but I don't want that in this regression.

                            Comment


                            • #15
                              Here is a short video that explains how CODE delimiters work (among other things). In case this does not get mentioned in the video (I have not watched all of it!), you can use code delimiters around output too.
                              --
                              Bruce Weaver
                              Email: [email protected]
                              Version: Stata/MP 18.5 (Windows)

                              Comment

                              Working...
                              X