Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: RE: RE: Replace missing values by 0


From   "Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: Replace missing values by 0
Date   Tue, 10 Aug 2010 08:24:07 -0700

But the original question was about missing values being represented as 0.  
Use of a blank cell for 0 allows the confusion of missing and true 0.  At any rate, if you want to code missing as 0 that's a problem to my mind.

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of David Radwin
Sent: Monday, August 09, 2010 3:29 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: Replace missing values by 0

Tony,

Sometimes data, especially count data, are stored in a spreadsheet where a
blank cell indicates a zero value. For example, if the data are
hand-entered and there are a lot of zero values, it is more efficient not
to enter a zero, and many spreadsheet functions treat the blank cell as a
zero value.

However, if you paste or -insheet- these data into Stata, the blank cells
are encoded as missing values. In this case it is necessary to convert the
missing values to zeroes.

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 Lachenbruch, Peter
> Sent: Monday, August 09, 2010 2:59 PM
> To: 'statalist@hsphsun2.harvard.edu'
> Subject: st: RE: Replace missing values by 0
> 
> In all of the discussion of this query, nobody has asked why it is
> important to do this?  If you are computing means, the 0 values will
> distort the mean (or median if enough), and if you simply want to ignore
> zeros with "if x~=0") retaining the missing value will do this
> automatically.
> 
> I am unsure if I've ever had a reason to convert missing values to a
> numeric value, but have had many times when the -9 for missing (or
> whatever) had to be set to "."
> 
> Tony
> 
> Peter A. Lachenbruch
> Department of Public Health
> Oregon State University
> Corvallis, OR 97330
> Phone: 541-737-3832
> FAX: 541-737-4001
> 
> 
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Hobst
> Sent: Monday, August 09, 2010 1:55 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Replace missing values by 0
> 
> I have two variabled called "prean" and "pa_kum" that contain missing
> values.
> These missing values i would like to replace by 0 (zero). What command
can
> i
> use to do this?
> 
> Thanks in advance for your support. Regards
> --
> View this message in context:
> http://statalist.1588530.n2.nabble.com/Replace-missing-values-by-0-
> tp5388239p5388239.html
> Sent from the Statalist mailing list archive at Nabble.com.

*
*   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   |   Site index