Hi,
I am currently preparing my dataset for further analyses and I have six different kind of missing values (.a, .b, .c, .d, .e, .f).
I would like to drop all observations that have missings (no matter what kind of missings) for certain specific variables.
Of course, I can check for all variables what kind of missings they have (for example, the variable "age" only has missings of type .a; variable "change" has missings of type .a and .c) and then drop the observations with missings using
drop if age==.a
drop if change==.a | change==.c
As this is kind of arduous, I wondered whether there is an easier way to do it.
I was thinking about something like
drop if change==.*
(which, unfortunately, does not work).
If somebody can help me with that problem, I would be very happy.
Thanks in advance!
Ally
I am currently preparing my dataset for further analyses and I have six different kind of missing values (.a, .b, .c, .d, .e, .f).
I would like to drop all observations that have missings (no matter what kind of missings) for certain specific variables.
Of course, I can check for all variables what kind of missings they have (for example, the variable "age" only has missings of type .a; variable "change" has missings of type .a and .c) and then drop the observations with missings using
drop if age==.a
drop if change==.a | change==.c
As this is kind of arduous, I wondered whether there is an easier way to do it.
I was thinking about something like
drop if change==.*
(which, unfortunately, does not work).
If somebody can help me with that problem, I would be very happy.
Thanks in advance!
Ally
Comment