Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Date: Sun, 8 Sep 2013 23:54:39 +0000


From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Date: Sun, 8 Sep 2013 23:54:39 +0000
Date   Mon, 9 Sep 2013 00:37:51 +0000

Hakan,

If you have the list of of crime types in a reasonably well-formatted list, you could create a data set out of the list and -merge- it with your original data set, keeping those that match:

. use original.dta 
. merge m:1 type using crimelist.dta
. keep if _merge==3

Regards,
Joe Canner
Johns Hopkins University School of Medicine

________________________________________
From: [email protected] [[email protected]] on behalf of HAKAN USLU [[email protected]]
Sent: Sunday, September 08, 2013 7:54 PM
To: [email protected]
Subject: st: Date: Sun, 8 Sep 2013 23:54:39 +0000

Hello All,

I hope someone can help me with this problem.
I am having problem with -keep if- command.
My do file is like this;

keep if type=="murder" | type=="theft" | type=="burglary" ....

I have more than 200  different crime types. When I run this command Stata gives me an error saying "too many Literals r(130)" if I put all 200 crime types in my list..Is there any other way for me to perform this operation?..

thanks in advance

Hakan Uslu

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index