Dear Stata users,
I’ve got a panel data set and want to delete the whole person (id) from the dataset if he or she has got a missing value on another a certain variable (=dose).
The structure looks like
id dose
1 0,5
1 0,3
1 1
1 .
2 0,99
2 .
3 0,5
3 0,33
3 0,8
3 0,89
3 0,56
In this example I would want to delete all data from id 1 and id 2 but keep all data from id 3.
After researching the forum, I already tried different commands but without any success.
I would be grateful for your help!
Thanks, Kathrin
I’ve got a panel data set and want to delete the whole person (id) from the dataset if he or she has got a missing value on another a certain variable (=dose).
The structure looks like
id dose
1 0,5
1 0,3
1 1
1 .
2 0,99
2 .
3 0,5
3 0,33
3 0,8
3 0,89
3 0,56
In this example I would want to delete all data from id 1 and id 2 but keep all data from id 3.
After researching the forum, I already tried different commands but without any success.
I would be grateful for your help!
Thanks, Kathrin
Comment