Hello everybody!
I am using STATA 14.2 for Mac. I have about 3,000 observations and I would like to select only those that have at least 3 characteristics in common. My study has to do with older people and problems they face with activities of daily living. I have inserted below a simplified table of my data. The various problems are coded as '0' (no problem) and '1' (with problem). What is the code for selecting only those people that are facing three and more problems (in my example, it should be observations 2,4, and 5)? Thank you very much! My problem might seem easy but I have been looking everywhere and wasn't able to find the answer!
I am using STATA 14.2 for Mac. I have about 3,000 observations and I would like to select only those that have at least 3 characteristics in common. My study has to do with older people and problems they face with activities of daily living. I have inserted below a simplified table of my data. The various problems are coded as '0' (no problem) and '1' (with problem). What is the code for selecting only those people that are facing three and more problems (in my example, it should be observations 2,4, and 5)? Thank you very much! My problem might seem easy but I have been looking everywhere and wasn't able to find the answer!
ID | Problem eating | Problem bathing | Problem shopping | Problem dressing | Problem going out |
1 | 0 | 0 | 1 | 1 | 0 |
2 | 1 | 1 | 0 | 1 | 1 |
3 | 1 | 0 | 0 | 1 | 0 |
4 | 1 | 1 | 1 | 0 | 1 |
5 | 0 | 1 | 1 | 1 | 0 |
3000 | 0 | 1 | 0 | 0 | 0 |
Comment