Dear Stata experts,
My question is very simple: I'd like to select only a subset of respondents in my panel data on the basis that they all died at home at a certain point in their lives (I have in fact multiple longitudinal observations of the same respondents).
In other words, I would like to retain ALL the observations relating ONLY to those respondents who died at home.
Conversely, I'd like to delete all the observations relating to respondents who died elsewhere.
What I do not want to have is ending up with a cross-section containing only the observations of deaths at home.
Is there a way to tag the unique identifier of those respondents who will die at home? Thus selecting only the observations relating to people who will die at home?
To do this manually would take a lot of time as I have 50k observations.
Let's say that the identifier is ID and homed==1 identifies a death home.
Thank you very much for your help,
Diana
My question is very simple: I'd like to select only a subset of respondents in my panel data on the basis that they all died at home at a certain point in their lives (I have in fact multiple longitudinal observations of the same respondents).
In other words, I would like to retain ALL the observations relating ONLY to those respondents who died at home.
Conversely, I'd like to delete all the observations relating to respondents who died elsewhere.
What I do not want to have is ending up with a cross-section containing only the observations of deaths at home.
Is there a way to tag the unique identifier of those respondents who will die at home? Thus selecting only the observations relating to people who will die at home?
To do this manually would take a lot of time as I have 50k observations.
Let's say that the identifier is ID and homed==1 identifies a death home.
Thank you very much for your help,
Diana
Comment