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]

Re: st: RE: RE: Need help with string observations


From   Michael Stewart <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: Need help with string observations
Date   Tue, 26 Feb 2013 18:02:56 -0500

Thank you David, Nick and Richard.All the recommendations are working
Thanks a lot.

Can you suggest is there are any other modules to match names if they
somewhat different like Richard & Ricard etc
Thanks
Mike


On Tue, Feb 26, 2013 at 1:52 PM, David Radwin <[email protected]> wrote:
> Oops. I should have said the first and *second* words or first and last
> *names*. Sorry. But I think the syntax will work for you.
>
> David
> --
> David Radwin
> Senior Research Associate
> MPR Associates, Inc.
> 2150 Shattuck Ave., Suite 800
> Berkeley, CA 94704
> Phone: 510-849-4942
> Fax: 510-849-0794
>
> www.mprinc.com
>
>
>> -----Original Message-----
>> From: [email protected] [mailto:owner-
>> [email protected]] On Behalf Of David Radwin
>> Sent: Tuesday, February 26, 2013 10:34 AM
>> To: [email protected]
>> Subject: st: RE: Need help with string observations
>>
>> Mike,
>>
>> There are several ways to do this. One is to just take the first and
> last
>> words and put a space in between:
>>
>> . gen firstlast = word(fullname, 1) + " " + word(fullname, 2)
>>
>> David
>> --
>> David Radwin
>> Senior Research Associate
>> MPR Associates, Inc.
>> 2150 Shattuck Ave., Suite 800
>> Berkeley, CA 94704
>> Phone: 510-849-4942
>> Fax: 510-849-0794
>>
>> www.mprinc.com
>>
>>
>> > -----Original Message-----
>> > From: [email protected] [mailto:owner-
>> > [email protected]] On Behalf Of Michael Stewart
>> > Sent: Tuesday, February 26, 2013 10:08 AM
>> > To: statalist
>> > Subject: st: Need help with string observations
>> >
>> > Hi,
>> >
>> > Can you please help me with  String function
>> > I have a list of patients and unfortunately some pts have their names
>> > recorded  in various formats like  James Edward ; James Edward H;
>> > James Edward J   etc
>> > Is it possible to write a code where the funcition  removes the last
>> > alphabet for the string if it is listed separately like
>> >
>> >  James Edward H--> James Edward
>> >
>> >
>> > --
>> > Thank you ,
>> > Yours Sincerely,
>> > Mike.
>>
>> *
>> *   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/



-- 
Thank you ,
Yours Sincerely,
Mike.
*
*   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