Statalist The Stata Listserver

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

Re: st: Usage of "keep if".

From   Richard Williams <>
Subject   Re: st: Usage of "keep if".
Date   Sun, 17 Sep 2006 16:28:11 -0500

At 03:10 PM 9/17/2006, Lucio Vinhas de Souza wrote:
Dear All,

I am sure this is very silly question, but I have a
variable that I want to "keep if==" it has only some
specific, non-continuos, values (namely, it is an
index variable that indentifies firms, and I want to
keep sepecific firms, let say 1, 7, 325, etc...). How
do I write the command line? I have been trying for
almost two hours, with different combinations and
nothing works. I am using STAT version 8.
try something like

keep if inlist(firm, 1, 7, 325)

See -help inlist- for more details.

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal):
WWW (department):
* For searches and help try:

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