Statalist


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

st: RE: AW: How can I merge two records within the same dataset?


From   "Karen Bonner" <K.Bonner@erini.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: AW: How can I merge two records within the same dataset?
Date   Fri, 28 Aug 2009 14:48:37 +0100

Martin

I can order the data by name and from that identify when companies are represented multiple times. There are some companies where there are more than two records which need merged. 

Any help is appreciated.

Karen 

------------------------------------------------------------

Karen Bonner
Senior Research Economist
ERINI
Floral Buildings 
2-14 East Bridge St
Belfast
BT1 3NQ

tel: 02890 727360
email: k.bonner@erini.ac.uk
web: www.erini.ac.uk


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss
Sent: 28 August 2009 13:27
To: statalist@hsphsun2.harvard.edu
Subject: st: AW: How can I merge two records within the same dataset?


<>

Is there a way to tell which company is represented multiple times w/o going
through the entire dataset? If so, are there -exactly- two records for any
company in need of a -merge-, or could there be multiple ones?

HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Karen Bonner
Gesendet: Freitag, 28. August 2009 13:35
An: statalist@hsphsun2.harvard.edu
Betreff: st: How can I merge two records within the same dataset?

Hi

I have a wide dataset with variables spanning from 1999-2008. Each row
of the dataset should contain a unique record relating to a company,
however I have several cases in which the id for the company changed
over time and thus the data for one company is contained on two separate
rows e.g from 1999-2003 is contained on row 1 and the data for 2004-08
for the same company (although under a different id) is on row 2. I
would like to know if there is a way to merge these two rows into one
without having to replace the observation for each individual variable
one at a time? 

 

Thanks

 

Karen 


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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