[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: Dropping all missing values

From   "Martin Weiss" <>
To   <>
Subject   st: AW: Dropping all missing values
Date   Mon, 14 Dec 2009 17:37:47 +0100


In most cases, -drop- is too draconian a measure to deal with the missing
problem, anyway. Just build up a binary variable for inclusion in an
estimation sample if you do not trust Stata to make sensible choices.

sysuse auto, clear
gen byte estsample=!mi(rep78, foreign)
regress price weight length trunk if estsample


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Mosi Ifatunji
Gesendet: Montag, 14. Dezember 2009 17:30
An: Statalist
Betreff: st: Dropping all missing values


I am at the final stage of dataset preparation and would like to
remove all missing values. I know that I can drop all missing values
with the following syntax:

drop x1 if == .
drop x2 if == .

But, because I am going to have quite a few variables in the final
dataset, I would prefer as short a command syntax as possible. Of
course the goals of such an exercise is to ensure that all of my
analysis for this study is based on the same cases.

Thank you so much,


Mosi A. Ifatunji, Ph.D. Candidate
ASA Pre-Doctoral Fellow
University of Illinois at Chicago
Department of Sociology (MC 312)
1007 West Harrison Street
Chicago, Illinois 60607-7140
Phone: (312) 607-2825

"Power concedes nothing without a demand."
                          - Frederick Douglass, 1857
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index