Announcement

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

  • Invalid syntax error -- but why?

    Hi, I'm pretty new at Stata and brand new to the forum so I hope I do this right.
    I'm labeling a ton of variables. I did them all and they worked when I ran them, but then I went back to add an "R-" or "D-" to the beginning of all of them to indicate the political party the data is for (ex: the description "favor balanced budget" changed to "D-favor balanced budget". Once I added the "R-" or "D-" prefix to the description, a few of the labeling commands came back with syntax errors even though that was the only change I made. They're the exact same as all of the others that are still running the same but I got syntax error r(198). I checked for spelling errors, etc, and still couldn't figure it out. Some guidance would be appreciated!

  • #2
    Show exactly what you typed at Stata, and exactly what Stata returned using proper formatting (the sharp # button on the menu).

    Comment


    • #3
      Sorry, I'm new! Thanks for telling me where to encode it. Hopefully this works!
      Code:
      . label varialbe CC18_321a_D "D- support right to abortion"
      invalid syntax
      r(198);

      Comment


      • #4
        Looks like you misspelled variable as varialbe.

        Comment

        Working...
        X