Announcement

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

  • ppmlhdfe Pseudo R2

    Hi,

    I am using the regressor: ppmlhdfe

    It shows me the Pseudo R2. How could I calculate the R2?

    Thanks!.


  • #2
    You can't really use R2 with nonlinear regressions. See e.g. https://statisticsbyjim.com/regressi...ar-regression/

    That's why most nonlinear models including ppmlhdfe have pseudo R2s. We use McFadden's but there are others:

    https://thestatsgeek.com/2014/02/08/...ic-regression/

    Comment


    • #3
      There is a big distance between can't and shouldn't, which as far as I can tell is some large fraction of what has to be explained to young children.

      I started reading Sergio's fast link and gave up quickly as the style was not congenial. I have the prejudice of preferring this story: https://www.stata.com/support/faqs/s...ics/r-squared/

      What I will assent to readily is a fork:

      1. R-squared makes maximal sense when one version of how a model is fitted is equivalent to "maximize R-squared".

      2. Otherwise use any summary you find it helpful, but distrust it mightily. Calling anything pseudo or even quasi is a device to try to have it both ways, in face of critics sending flak from different directions.

      Comment


      • #4
        I generally do not see any interest in using R2 either in linear or non-linear models because it tell us noting about the adequacy of the model; a useful model does not have to have a "good fit" and models with a great fit may be useless.

        Anyway, what is specific about the linear model is the interpretation of the R2 in terms of percentage of explained variation. However, the usual R2 in linear models can also be computed as the square of the correlation between y and its fitted values (I guess that is why it is called R2). This naturally extends to non-linear models and so there is a perfectly valid R2 for non-linear models; this is what is provided in ppml for those who insist in reporting the R2.

        Best wishes,

        Joao

        Comment


        • #5
          Thank you very much!

          Comment


          • #6
            Note that João's point in #4 is precisely that echoed in the FAQ cited in #3.

            (In #3 "fast" was a silly autocorrect for what was intended as "first".)

            Comment


            • #7
              Dear Sergio Correia

              Notice that because it is likelihood based, McFadden's pseudo R2 is not scale invariant. This example illustrates the problem:

              Code:
              sysuse auto
              ppmlhdfe price mpg, a(rep78)
              g p=price/1000
              ppmlhdfe p mpg, a(rep78)
              Therefore, is is not really suitable with PPML.

              Best wishes,

              Joao

              Comment


              • #8
                Originally posted by Joao Santos Silva View Post
                Dear Sergio Correia

                Notice that because it is likelihood based, McFadden's pseudo R2 is not scale invariant. This example illustrates the problem:

                Code:
                sysuse auto
                ppmlhdfe price mpg, a(rep78)
                g p=price/1000
                ppmlhdfe p mpg, a(rep78)
                Therefore, is is not really suitable with PPML.

                Best wishes,

                Joao
                Interesting, thanks for pointing it out. We chose McFadden's because that's what Stata's command use (for either poisson or glm..). I guess this makes sense for actual poisson models (where you can't just divide a count by 1000) but not so much for pseudo.

                Is there a preferred alternative in this case?

                Comment


                • #9
                  Dear Sergio Correia,

                  As I said in #4 above, in ppml I use the square of the correlation between y and the fitted values.

                  Best wishes,

                  Joao

                  Comment

                  Working...
                  X