Announcement

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

  • Comparing R2 across groups

    Hi,
    I was wondering if it is possible to test for significant differences in r squared across groups.
    That is, I am running the same model seperately for men and women, and find that the explained variance appears to differ substantially (in both cases small, but almost twice as big in women). Is there any formal way to test if the two r squared are significantly different? If such a comparison is even meaningful?
    Thank you in advance.

  • #2
    Hi Anne
    This sounds to me as a chow test to me.
    Not sure, however, how much more information can be obtained from there other than testing that the unexplained variance depend on gender.
    HTH
    Fernando

    Comment


    • #3
      Thank you Fernando, but I am not interesting in testing whether the coefficients are equal across the two groups (which is what I understand a chow test to report) but whether a model as a whole explains significantly more variance in one group compared to the other.

      Comment


      • #4
        That is a misunderstanding of the chow test.
        If you look closely, a chow test is also a kind of goodness of fit test, because you are looking at how the goodness of fit using two separate models compare to a pooled model. It doesnt really test equality of the coefficients of the model.
        Alternatively, I think you could apply bootstrapping to test if the R2 of both models are different from each other.

        Comment


        • #5
          Okay, thank you. I see the difference, but I still don't think that gives me what I'm looking for. Bootstrapping sounds more like what I need to look into.

          Comment


          • #6
            in that case here is a small sketched of a program that would do that:
            Code:
             program r2bootstrap, eclass
             reg price mpg headroom if foreign==0
             local r2a=e(r2)
             reg price mpg headroom if foreign==1
             local r2b=e(r2)
             matrix b=[`r2a',`r2b',`r2a'-`r2b']
             matrix colname b=r2_model1 r2_model2 r1_r2
             ereturn post b
             end
            
            sysuse auto, clear
            bootstrap:r2bootstrap

            Comment


            • #7
              Very helpful, thank you!

              Comment

              Working...
              X