Announcement

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

  • error r(111)*year not found

    Hello guys
    I was working normally today on Stata but when I tryed to generate a variable "age" with "gen age = year - birth" Stata gave me the error r(111) year not found.
    How can that happen, since I was using it yesterday and was working?
    I also have time series variable from 2010 to 2019.
    Thanks in advance

  • #2
    If you try the command again, and it again fails, then immediately run the command
    Code:
    describe
    and it will tell you what variables you do have. Perhaps you made a mistake typing the name. Perhaps you forgot that the name is YEAR or Year or something else similar rather than year. Perhaps you created the year variable from your time series variable but did not save the revised dataset afterwards, so year was not added to the dataset on disk.

    Comment

    Working...
    X