Announcement

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

  • Calculate r-squared and pseudo r-squared

    Does anyone know the command to calculate pseudo r-squared or r-squared?

    estat ...

    Thanks

  • #2
    Most programs provide those when they are appropriate. What exactly are you trying to do? Or, when are you not getting them when you want them?
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      I'm using a zero inflated negative binomial model.
      I think I figured out how to calculate pseudo r-squared.

      1 - loglikelihood of my model / loglikelihood of null model.

      Does this sound correct?

      Thanks.

      Comment


      • #4
        You may want to install spost13_ado:

        findit spost13_ado

        and run the fitstat command. fitstat reports several pseudo r2 measures. For a brief discussion, see

        https://www3.nd.edu/~rwilliam/stats3/L05.pdf

        fitstat does report pseudo r2 measures after zinb. But having said that, my experience is that, when Stata does not report some stat, it is either because (a) it is not statistically appropriate, or (b) nobody has bothered to program it. Since programming would be easy in this case I suspect (a). In the case of a 2 step model like zinb, I am not sure what the pseudo r2 is referring to, i.e. does it only refer to the 2nd step or both?

        In short, you can get a pseudo r2, but I am not sure that you should or what it means. Maybe others can help.

        TIP: You often get more responses when your subject title is clearer. In this case I suspect you'd get more help if you had added zinb to the title. Then all the zinb experts might check the post out.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          Nick Cox shares my concern. Or at least he did 12 years ago.

          https://www.stata.com/statalist/arch.../msg00622.html
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment


          • #6
            Thanks Richard, this is quite helpful and good advice. I'm taking a closer look at things. You're likely correct in that I likely don't need the pseud r-squared indices. I'm not sure if comparing to a null model makes any relevant sense.

            I'll make sure to provide more meaningful subject titles. Thanks

            Comment


            • #7
              Richard in #5 refers to an FAQ from 2003

              https://www.stata.com/support/faqs/s...ics/r-squared/

              which still looks good to me, modulo newer editions being available for each book cited.

              Using loglikelihood in a measure is certainly popular and much hinges on whether your community can be expected to recognise the idea.

              Comment

              Working...
              X