Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Improve matching


From   "Seliger Florian" <seliger@kof.ethz.ch>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Improve matching
Date   Fri, 17 May 2013 15:20:29 +0000

Dear Statalist,

I want to improve matching of two datasets. I use a matching software, but want to prepare the datasets with STATA.
One dataset is in panel structure, i.e. I have multiple observations per ID:

ID           firm
314         POLYTYPE
314         POLYTYPE  MASCHINENFABRIK
314         POLYTYPE  NA
314         POLYTYPE
314         POLYTYPE
314         POLYTYPE

The length of the firm name may vary across IDs.
I noticed that it is necessary to keep only the ID with the LONGEST NAME, in this case "POLYTYPE MASCHINENFABRIK".
It is necessary to delete all other IDs for the same observation to enable a proper matching (due to the software).

Any suggestions how I could only keep the LONGEST NAME IDs (each observation has different names, and within each observation each ID has different names, there is no regularity) in STATA?

Thank you for your consideration.

Best,
Florian

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index