Statalist


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

st: RE: Dropping all missing values


From   "David Radwin" <dradwin@mprinc.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Dropping all missing values
Date   Mon, 14 Dec 2009 08:52:29 -0800 (PST)

If you want to drop the set of variables where the values are all missing,
perhaps because of issues importing them from another data format, you
might use Nick Cox's -dropmiss- from SSC.

. ssc install dropmiss

David

--
David Radwin
Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794

www.mprinc.com


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Mosi Ifatunji
> Sent: Monday, December 14, 2009 8:30 AM
> To: Statalist
> Subject: st: Dropping all missing values
> 
> Friends,
> 
> 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
> 
> --
> 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
> Email: mosi@ifatunji.com
> Web: http://www.uic.edu/depts/soci/
> http://blackyouthproject.uchicago.edu/
> http://www.2008andbeyond.com/
> http://www.ifatunji.com/
> 
> "Power concedes nothing without a demand."
>                           - Frederick Douglass, 1857
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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