Bookmark and Share

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

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

RE: st: strgroup

From   "Liao, Junlin" <>
To   "" <>
Subject   RE: st: strgroup
Date   Mon, 21 Feb 2011 20:30:07 +0000

I had the same experiences before. One thing to look for is spaces trailing at beginning or end of string. For this kind of situation, I would use Excel to run a pivot table to find out all necessary changes and use Excel to generate the codes. Then paste the codes to a do file. Everything get fixed instantly.


-----Original Message-----
From: [] On Behalf Of Emily Farchy
Sent: Monday, February 21, 2011 1:23 PM
To: ''
Subject: RE: st: strgroup

Dear Dimitriy,

Thank you so much for your help. I am trying to match some badly spelled names.  They are all in the same variable, but over different periods.  In the end I tried to do it manually (see below) but even this doesn't seem to have worked and when I run it, for many of the obs it returns '0 changes made'  I copied and pasted from the cells so can't think that I have made a typo!

Any ideas?

*Badly named heads
replace off_name  = "Drs. Makmur Syahputra, Sh" if off_name=="H. Makmur Syah Putra, Sh, Mm"
replace off_name = "Drs. H. Risuddin" if off_name=="Risuddin"
replace off_name  = "Amru Helmy Daulay Sh" if off_name=="H Amru Helmy Daulay Sh"
replace off_name  = "Drs H Abdillah Se Ak Mba" if off_name=="Drs H Abdillah Se Ak. Mba"
replace off_name  = "Dr H Sutrisno Hadi Sp.Og" if off_name==" "
replace off_name  = "Drs Zulkarnain Nasution" if off_name=="Zulkarnain Nasution"
replace off_name  = "Kol Mar Dairus Apan" if off_name=="Kol Mar (Purn) Dairus Apan"
replace off_name  = "Kol Mar Dairus Apan" if off_name=="Darius Apan"
replace off_name  = "Drs H Syamsurizal" if off_name=="Drs H Syamsurial"
replace off_name  = "Drs Thamsir Rachman" if off_name=="Drs H Raja Tamsir Rahman"
replace off_name  = "T Azmun Jaafar Sh" if off_name=="H T Azmun Jafar"
replace off_name  = "H Arwin Sh" if off_name=="Arwin As Sh"
replace off_name  = "Drs Abdullah Hich" if off_name=="Drs H Abdullah .H"
replace off_name  = "Drs H A Madjid Mu'Az Mm" if off_name=="Drs H A. Madjid Mu'Az"| off_name=="Drs H A. Madjid Mu'Az Mm"
replace off_name  = "Dr H Zulfikar Achmad Se" if off_name=="Dr H Zulfikar Achmad"
replace off_name  = "Alex Noerdin" if off_name=="Ir H Alex Noerdin Sh."
replace off_name  = "Eddy Yusuf" if off_name=="Eddy Yusuf Sh Mm"
replace off_name  = "Drs Andi Ahmad Sampurna Jaya M Si." if off_name=="H Andy Achmad S Jaya. M.Si"
replace off_name  = "Drs Abdurachman Sarbini Sh" if off_name=="Abdurrachman Sarbini"
replace off_name  = "Drs Tatang Farhanul Hakim" if off_name=="Kol Inf H. Suliana Wirata Hadi Subrata"
replace off_name  = "Itoch Tohija" if off_name=="Ir H M. Itoc Tochija Mm"
replace off_name  = "Drs Djasri St Mm." if off_name=="Drs Djasri St.Mm"
replace off_name  = "Bambang Bintoro Se" if off_name=="H Bambang Bintoro Se"
replace off_name  = "Ir Basuki Widodo" if off_name=="Ir H Basuki Widodo"
replace off_name  = "Probo Yulastoro" if off_name=="H Probo Yulastoro S Sos Mm"
replace off_name  = "Hendro Martojo" if off_name=="Drs Hendro Martojo Mm"
replace off_name  = "Dra Rustriningsih" if off_name=="Dra Hj Rustriningsih"
replace off_name  = "Hendy Boendoro Sh" if off_name=="H Hendy Boendoro Sh M Si"
replace off_name  = "Tasiman" if off_name=="H Tasiman S H."
replace off_name  = "H M Machroes Sh." if off_name=="H M Machroes S.H"
replace off_name  = "Drs Triono Budi Sasongko M Si" if off_name=="Drs Triyono Budi Sasongko"
replace off_name  = "Ir Bambang Guritno" if off_name=="H Bambang Guritno"

-----Original Message-----
From: [] On Behalf Of Dimitriy V. Masterov
Sent: 21 February 2011 19:07
Subject: Re: st: strgroup


It should work on a Mac. What do -di c(machine_type)- and -di c(os)- produce?

Alternatively, you could install a 32-bit version of Stata executable.
This is a bit of a pain. Instructions here:

Another approach is to describe (with examples) what you wish to accomplish with strgroup. For example, reclink (from ssc) and soundex have proven valuable in the past.

*   For searches and help try:

*   For searches and help try:

Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.

*   For searches and help try:

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