Hello everyone!
I've been cheking the data base, and the following is a little piece of what I've found (total observations are 30 361):
I realized that the first three observations of HHID were badly typed. I checked manual reference, but "drop" command didn't convince me at all. Bearing in mind this, I have some questions:
1.- How can I delete the first three badly typed observations? I want to delete the complete row (beginning with HHID and including observations from HVIDX, AGE, and ALIVE variables). The result that I would like to have would be like this:
2.- Then, how can I delete those observations if the AGE>6 (beginning with HHID and including observations from HVIDX, AGE, and ALIVE variables). The result that I would like to have would be like this:
3.- How can I delete those observations if ALIVE==. (missing) Is it the same process in the previous question that applies here as well?
Thanks in advance for your help
I've been cheking the data base, and the following is a little piece of what I've found (total observations are 30 361):
HHID | HVIDX | AGE | ALIVE |
"96921 | 2 | 4 | yes |
#740"2 | 6 | 5 | yes |
057=34 | 5 | 2 | no |
146789 | 1 | 3 | yes |
146789 | 2 | 7 | no |
146789 | 3 | 1 | - |
146790 | 1 | 2 | no |
146790 | 2 | 5 | - |
146790 | 3 | 8 | yes |
146790 | 4 | 6 | yes |
146790 | 5 | 4 | - |
1.- How can I delete the first three badly typed observations? I want to delete the complete row (beginning with HHID and including observations from HVIDX, AGE, and ALIVE variables). The result that I would like to have would be like this:
HHID | HVIDX | AGE | ALIVE |
146789 | 1 | 3 | yes |
146789 | 2 | 7 | no |
146789 | 3 | 1 | - |
146790 | 1 | 2 | no |
146790 | 2 | 5 | - |
146790 | 3 | 8 | yes |
146790 | 4 | 6 | yes |
146790 | 5 | 4 | - |
2.- Then, how can I delete those observations if the AGE>6 (beginning with HHID and including observations from HVIDX, AGE, and ALIVE variables). The result that I would like to have would be like this:
HHID | HVIDX | AGE | ALIVE |
146789 | 1 | 3 | yes |
146789 | 3 | 1 | - |
146790 | 1 | 2 | no |
146790 | 2 | 5 | - |
146790 | 4 | 6 | yes |
146790 | 5 | 4 | - |
Thanks in advance for your help
Comment