Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: replace missing values (fwd)


From   "Maarten Buis" <M.Buis@fsw.vu.nl>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: replace missing values (fwd)
Date   Mon, 16 Oct 2006 08:41:30 +0200

Cathy:
Mean imputation is not a good way of dealing with missing 
data. Think of a scatter plot with two variables and 
where your "imputed values" end up in that scatter plot. 
They will look really different from the rest of the data 
and will affect the estimated regression line. For an 
accessible account see Paul Allison's 2002 book 
"Missing Data" from Sage (a "little green sage book") 

A good alternative is Patrick Royston' s -ice- 
(see: -findit ice-)

HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z434 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Cathy L. Antonakos
Sent: maandag 16 oktober 2006 5:51
To: statalist@hsphsun2.harvard.edu
Subject: st: replace missing values (fwd)

Sending again with a formatting correction, to hopefully display the data correctly this time.
CA

--------------------

I have a dataset with hospital and ICU data. I'd like to replace missing data
for one ICU with the average value of the other 3 icu's at that hospital. The
dataset looks like this:

Unit_ID  Total_Score
11       .
12       90
13       60
14       27

I can get the average for total score for the 3 units by using "if" and
specifying the unit id's. But how can I then replace the missing unit's score
with the average from the 3 other units? I've tried several ways and searched
online but can't find an answer to this specific problem. Thanks for any help
you can provide.
Cathy


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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