Dear Statalists,
I got a tiny problem which trying to filter some qualified subjects from a dataset. I have around 30 variables of which names are all like: h_1_all, h_4_all, h_12_all... The only difference between the names is the number in the middle which is not continuous. And there is also a variable named "id". I'd like to list all "id" of which any of the h_*_all variables has a missing value. But the command like below is not working:
list id h_*_all if h_*_all==., N
The result shows h_ ambiguous abbreviation.
What should I do to solve this issue? Thank you very much!
Ying
I got a tiny problem which trying to filter some qualified subjects from a dataset. I have around 30 variables of which names are all like: h_1_all, h_4_all, h_12_all... The only difference between the names is the number in the middle which is not continuous. And there is also a variable named "id". I'd like to list all "id" of which any of the h_*_all variables has a missing value. But the command like below is not working:
list id h_*_all if h_*_all==., N
The result shows h_ ambiguous abbreviation.
What should I do to solve this issue? Thank you very much!
Ying
Comment