Statalist The Stata Listserver


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

Re: st: dropping observations


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: dropping observations
Date   Sun, 17 Jun 2007 18:09:21 +0100 (BST)

--- [email protected] wrote:
> when I use the following command:
> drop if x>450
> STATA drops a lot of observations, while when  I exclude missing
> values as  follows:
> drop if x>450 & x!=.
> STATA eliminates just a couple of observations 

This is well known behaviour: In Stata missing values are the largest
possible values, so a missing value will be larger than 450. As result
if you type -drop if x>450- the missing values will also be dropped.

> I realized this when I run a regression including x as regressor. If
> STATA drops missing data with the first command,  shouldn't drop the
> same observations when I run the regression after using the second
> command?

I don't think I understand the question. Do you think that -regress-
should influence the way -drop- behaves?

Maarten

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

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

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


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index