Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Data manipulation question


From   "Hoetker, Glenn" <ghoetker@uiuc.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Data manipulation question
Date   Fri, 20 Aug 2004 16:55:00 -0500

currently active and really hope someone can help me.  My data is on
alliances and looks like this:
              Deal	Firm1	Firm2	...	Firm10 Data1	Data2...
AData
              1	1	2		10	A		B
Y
              2	1	4			C		D
Z
              
              where DEAL is a unique index for each alliance;
Firm1-Firm10 are codes for the 1 to 10 companies involved in the
alliance; and Data1-Data10 are data describing the Firms in the
alliance.  AData is data on the alliance as a whole.
              I want to transform the data into the following forma
       Deal	FocalFirm	PartnerFirm	DataOnFocFirm
DataOnPartFirm	AData
       1	1		2			A
B	Y
       1	2		1			B
A	Y
       ...
       1	1		10			XX
XX	Y
       1	10		1			XX
XX	Y
       2	1		4			C
D	Z
       2 	4		1			D
C	Z
              
        That is, I want to decompose (expand?) each Deal into each dyad
of firms involved, listing the dyad twice--giving each firm a turn as
FocalFirm and a turn as PartnerFirm.  The number of firms involved in
each deal is variable. 
       Any insights into the best way to do this would be most
appreciated!
       
       Glenn Hoetker
       Assistant Professor of Strategy
       College of Business
       University of Illinois at Urbana-Champaign
       217-265-4081
       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/



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