Announcement

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

  • Error message after margins

    I keep getting a mysterious error message after running margins. Here is my code:

    Code:
    meologit phq4_score_cat i.gender##i.wave if cc==1 || id:
    test 2.gender#2.wave 2.gender#3.wave
    margins, subpop(if cc==1) at(gender=(1 2) wave=(1 2 3)) ///
        predict(pr outcome(2))
    When I run this, margins posts the margins properly. But if I try to run marginsplot after this, or add saving(gender, replace) as an option to the margins command, it won't run and will give me the following error: may not label -2147483648 r(198);

    I've used margins a million times before and have never seen this. The only thing I've done differently was clean the data in R and then export to Stata for analyses. So I'm wondering if there is something strange going on with that process. I would appreciate any help that can be provided for solving this.

  • #2
    Kira did you ever solve this problem? I'm getting the exact same error message when using marginsplot after the margins command seems to work correctly.

    Comment

    Working...
    X