Announcement

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

  • option over() not allowed after margins, post

    I can run:
    Code:
    margins, over(my_dummy_variable) post
    the first time, and get the results in e() in order to t-test for the significance of margin differences.
    But I cannot run it a second time.
    If I run it a second time, I get:
    Code:
    option over() not allowed
    r(198);
    Last edited by Giuseppe Polito; 08 Nov 2022, 10:45.

  • #2
    -post-ing results has the effect of clearing the previous estimation results, namely those from your model. You will need to re-run the model again, or else save and later restore the results in the following way.

    See more at -help estimates store-.

    Code:
    // run your model here
    est sto MyModel // save the model results for later use
    
    margins ...., post  // do something with the model results
    
    est restore MyModel  // load the model results back

    Comment


    • #3
      Originally posted by Leonardo Guizzetti View Post
      -post-ing results has the effect of clearing the previous estimation results, namely those from your model. You will need to re-run the model again, or else save and later restore the results in the following way.

      See more at -help estimates store-.

      Code:
      // run your model here
      est sto MyModel // save the model results for later use
      
      margins ...., post // do something with the model results
      
      est restore MyModel // load the model results back
      That was it.

      Thank you so much!

      Comment

      Working...
      X