Hello,
I am trying to fill in the "town" variable in my dataset, and I cannot think of any Stata code to do it (please refer to the picture I have attached for this question). For all the missings of "town" that come after "ABINGTON" and before "ACTON", I'd like it to say "ABINGTON"; for those after "ACTON" and before the next value, I'd like those to say "ACTON", and so on. Is there a way to do that using the seqnum variable? I hope my question is not too confusing and that the screenshot is helpful. Thanks so much for your advice.
Khat
I am trying to fill in the "town" variable in my dataset, and I cannot think of any Stata code to do it (please refer to the picture I have attached for this question). For all the missings of "town" that come after "ABINGTON" and before "ACTON", I'd like it to say "ABINGTON"; for those after "ACTON" and before the next value, I'd like those to say "ACTON", and so on. Is there a way to do that using the seqnum variable? I hope my question is not too confusing and that the screenshot is helpful. Thanks so much for your advice.
Khat
Comment