Announcement

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

  • Error after marginsplot

    I am running multinomial logit and am getting an error message for one of my independent variables.

    mlogit voted_pres_recode pid7
    margins, at(pid7=(1 2 3 4 5 6 7)) predict(equation(1))
    marginsplot

    When I run these line by line, the first two lines seem to act normally, with no unusual values in the output, but marginsplot generates the error message:

    . marginsplot
    may not label -2147483648
    r(198);

    I tried the process with ologit and got exactly the same error message, after ologit and margins appear to work normally.
    marginsplot works correctly with other independent variables, so it seems like it's a problem with that independent variable;
    I've examined the values for pid7 with sum, tab, and case by case in the Data Editor and can't find any incorrect values, so where else might I find or ascertain the source of the errors?


  • #2
    I have figured out the problem...In the variable manager, the Value Label showed that for some reason, -2147483648 was a labeled category (in this 7 point scale); once I deleted that category label, marginsplot worked normally. Hopefully this helps someone else!

    Comment


    • #3
      Thank you for posting your solution.

      Comment

      Working...
      X