Announcement

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

  • How do I calculate percentages after running logistic regression (melogit) adjusting for multiple covariates?

    I found this question on the Stata Forum from 2012 from Maria Au, but no answer. I have the same question:

    Maria Au: “I read an article recently that presented a table on "Percentage of US adults reporting >1 consumption of alcohol by race" after adjusting for sociodemographics including sex, education, martial status, and income in a multivariate logistic regression. I understand you can present percentages of individuals who either had "consumed" or "not consumed" in a bivariate analysis. But how do you do that AFTER running a logistic regression (or multinomial regression) adjusting for multiple covariates?”


    I calculated percentages (e.g. marijuana use) for three groups of women for three points in time and graphed them, resulting in three lines. Then I ran the analysis in melogit with no covariates, added the coefficients (constant, time, group, group*time), turned the sums into probabilities (exp(logit sum)/(exp(1+(logit sum)). I then multiplied by 100 to get percentages and graphed them. The two figures should be approximately the same, but the aren’t. What am I doing wrong?

  • #2
    correction: I meant to write (exp(logit sum)/(1+exp(logit sum))
    The resulting graph shows trends I expect, but the results are below zero. So the scale appears incorrect. What to do?

    Comment


    • #3
      I suspect that what you want to do can be accomplished with the margins or marginsplot commands. See the output of help melogit postestimation as a starting point.

      If you are not already familiar with these commands, you may find a good introduction in the nice overview of margins prepared by Richard Williams, a frequent contributor here, at https://www3.nd.edu/~rwilliam/stats3/Margins01.pdf with a more detailed paper in the Stata Journal at http://www.stata-journal.com/article...article=st0260. I'll also note that Margins01.pdf is followed by Margins02.pdf ... Margins05.pdf covering more specialized topics.

      And all five of these PDFs, and plenty more of use to someone learning about the analysis of categorical data, are linked to from http://www3.nd.edu/~rwilliam/stats3/ - the material mentioned above is found in the section headed Interpreting results: Adjusted Predictions and Marginal effects.

      Comment


      • #4
        Now I understand that I can't do this by hand, but need to first save predicted values with predict pr.
        But then what? I want to graph group means (probabilities) across time.

        Comment

        Working...
        X