Announcement

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

  • Save results after margins

    Hi,

    I'm using margins after running multi-level logistic models and would like to save the outputs to produce tables and graphs at any time, that is without needing to rerun the models and margins (as it can be quite time-consuming) days after having run the models. Do you know whether this would be feasible?

    Thanks

  • #2
    Yes, this is feasible with any estimation command that works with
    margins.

    See the post option in the margins documentation and
    documentation for commands estimates save and estimates use.

    Comment


    • #3
      Thanks Jeff Pitblado (StataCorp), that's perfect! Anyway I can manipulate the estimates afterwards? I'd like to use the estimates for a coefficient plot, and report the margins as percentage change as opposed to unit change.

      For example:
      Code:
      use https://stats.idre.ucla.edu/stat/data/hsbdemo, clear
      logit honors i.female read
      margins, dydx(female) post
      /*
      Average marginal effects                                   Number of obs = 200
      Model VCE: OIM
      
      Expression: Pr(honors), predict()
      dy/dx wrt:  1.female
      
      ------------------------------------------------------------------------------
                   |            Delta-method
                   |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
            female |
           female  |   .1514206   .0513275     2.95   0.003     .0508205    .2520208
      ------------------------------------------------------------------------------              
      */
      
      estimates save "test_margins.dta", replace
      estimates use "test_margins"
      coefplot
      I'd like to change the x-axis a report a 15% increase in probability as opposed to 0.15 if possible.

      Thanks again!

      Comment


      • #4
        All good, I see that using the option rescale(XX) does the trick!

        Comment

        Working...
        X