Statalist The Stata Listserver


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

st: Re: na.omit synonym


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: na.omit synonym
Date   Wed, 20 Jun 2007 09:12:35 -0400

...I have no knowledge of R, but it sounds like this is one (of many) ways to get what you want:

gen byte touse=1
markout touse var1 var2 var3

will create a variable named touse which contains 1s for cases with no missing values in var1, var2, or var3, and zeros otherwise. You can then use -if touse- after most commands or just -drop if touse- to actually drop them from the dataset.

Michael Blasnik

----- Original Message ----- From: "bunny , lautloscrew.com" <[email protected]>
To: <[email protected]>
Sent: Wednesday, June 20, 2007 7:41 AM
Subject: st: na.omit synonym



HI everybody,

i have several non-response in my dataset that are coded -1 .
i�d like to drop any observation (row) where one or more columns contains a -1.

In R there's na.omit to the job. is there a similiar syntax in stata ?

thx in advance

matthias
*
*   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