[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Mehmet Beceren <mbeceren@hbs.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Dividing a variable |

Date |
Wed, 23 Oct 2002 15:27:15 -0400 |

Glenn,

I can suggest a mechanical way using Excel along with Stata... It may look laborious but it should not take long....

1. Convert (or copy) your data to Excel and Save it as Text file.

2. Open the text file in excel by using Delimited option, and choose " ; " and "space" as delimiters

3. If you do it right, you should have the individual names and the patent numbers separated in different columns

4. assign variable names as person1, person2...personN for each separated name

Now convert (or copy) your data back to Stata

You can use reshape (long) command to accumulate each person* in one column

OR

Without going back to Stata, copy and paste each person* and corresponding patent number into different file (or worksheets) and then append them one below the other one... this should not take long if you do not have too many names corresponding to the same patent...

you can convert the appended data ( 2 columns: Name -- Patent No ) back to Stata, and sort it however you like...

hope this was helpful

--Mehmet

At 02:58 PM 10/23/2002, you wrote:

Hoping someone can help me with a problem involving dividing up a variable. My data consists of patent numbers and inventors and looks like this: nmi wku Schmitt, Ty; Gandre, Jerry 5586003 Sato, N. Albert; Baker, David C.; Waldron, Christie J. 5586324 Swamy, N. Deepak 5587885 I would like it to look like this: nmi wku Schmitt, Ty 5586003 Gandre, Jerry 5586003 Sato, N. Albert 5586324 Baker, David C. 5586324 Waldron, Christie J. 5586324 Swamy, N. Deepak 5587885 That is, I want to create a record containing each inventor and his or her associated patent number. If Ty Schmitt had five patents, he should show up in five records. The number of inventors per patent varies from one to many. I've looked for egen functions (and their extensions) and done some experimenting, but am floundering. Any help would be very appreciated! Glenn H. Glenn Hoetker Assistant Professor of Strategy Department of Business Administration University of Michigan at Urbana-Champaign 217-355-4891 ghoetker@uiuc.edu * * 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/

* * 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/

**References**:**st: Dividing a variable***From:*"Hoetker, Glenn" <ghoetker@uiuc.edu>

- Prev by Date:
**st: Arellano-Bond and second-order autocorrelation** - Next by Date:
**st: RE: Dividing a variable** - Previous by thread:
**st: Dividing a variable** - Next by thread:
**st: RE: Dividing a variable** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |