.- help for ^dropmiss^ (STB-60: dm89) .- Drop variables (observations) that are all missing -------------------------------------------------- ^dropmiss^ [varlist] [ , ^any t^rim ^p^iasm ] ^dropmiss^ [varlist] [^if^ exp] [^in^ range] ^, o^bs [ ^any t^rim ^p^iasm ] Description ----------- ^dropmiss^ drops those variables in varlist for which all (optionally any) observations have missing values, that is^ .^ for a numeric variable and ^""^ for a string variable. varlist defaults to all variables. ^dropmiss^ with the ^obs^ option drops those observations for which all (optionally any) variables in varlist have missing values. varlist defaults to all variables. Note that it is easy enough to type, e.g., ^drop if myvar == .^ if that is desired. Options ------- ^any^ specifies that variables or observations are to be dropped if any values are missing in those variables or observations. Note that this can have drastic effects and may even result in the dropping of all data. ^trim^ specifies that whether string values are missing is to be determined after trimming leading and trailing spaces. For example, with ^trim^ ^" "^ (a single blank) would count as missing. ^piasm^ specifies that Period Is Also String Missing, that is, ^"."^ counts as missing. Some Stata users use ^"."^ to indicate missing. ^trim piasm^ would specify that, e.g., ^" . "^ counts as missing. ^obs^ specifies that observations are to be dropped for which values of varlist are missing. Examples -------- . ^dropmiss^ . ^dropmiss, obs^ With the auto dataset, . ^dropmiss^ drops nothing . ^dropmiss, any^ drops ^rep78^ . ^dropmiss, obs^ drops nothing . ^dropmiss, obs any^ drops 5 observations for which ^rep78^ is missing Author ------ Nicholas J. Cox, University of Durham, U.K. n.j.cox@@durham.ac.uk Acknowledgments --------------- Jeroen Weesie suggested adding ^if^ and ^in^. Estie Sid Hudes prompted the addition of an optional varlist when the ^obs^ option is specified and of the ^any^ option. Also see -------- On-line: help for @drop@