I have long data that is unique at the person_id and year level. I have a binary variable "treated"... 1 for whether they receive treatment that year, and 0 if they do not receive treatment that year. I want to make a new column in which all subsequent years (meaning rows) should have a treated value of 1 after the first treated year (row) for each person.
here are my two current ideas how to create this indicator, but they are both wrong: