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 <[email protected]>
To   [email protected], [email protected]
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: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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