Announcement

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

  • How to do a margin plot with variables with non integers?

    Hello, I am trying to do a margin plot with interacion terms, but when I run
    Code:
    margins ssr., at(uai=(1(5)100))
    after
    Code:
    fracreg logit c.expinstylow c.ssr##c.uai
    I received a message saying "uai: factor variables may not contain noninteger values".
    How can I solve that please? an alternative could be change everything to integers, how can I do that too? what do you recommend me to do?
    Thank you !!
    Alejandro

  • #2
    I just saw in another post how to round a noninteger, but my problema remain because one of the variables are scores from 0,01 to 0.97...I am not sure if it is good multiplied x 100.
    thank you

    Comment


    • #3
      You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions. Making it easy for us to replicate your problem would increase the likelihood you've get help.

      I don't understand the ssr. in margins. Are you looking for dydx(ssr) or what? When I tried to replicate your problem, Stata said x. (which I used in place of ssr.) was not a valid name. Normally, Stata is quite happy with factor variables that are identified as continuous and have non-integer values. It is only if Stata thinks the factor variable should be integer that it generates a problem.

      Comment

      Working...
      X