Statalist The Stata Listserver

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

Re: st: Re: Re: na.omit synonym

From   "bunny ," <>
Subject   Re: st: Re: Re: na.omit synonym
Date   Wed, 20 Jun 2007 16:31:22 +0200


it looks like it would work though :) . sure there are many ways, probably some drop if with and/or and all variables would also work...
i just thought there's a syntax that drops all missings directly. in a way this is what neil suggested....

thx everybody!!

Am 20.06.2007 um 15:38 schrieb Michael Blasnik:

Woops, my suggestion will only work after you recode -1 to missing.

----- Original Message ----- From: "Michael Blasnik" <>
To: <>
Sent: Wednesday, June 20, 2007 9:12 AM
Subject: st: Re: na.omit synonym

...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 ," <>
To: <>
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.
*   For searches and help try:

*   For searches and help try:

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