Hi,
I am currently working on the following problem and it would be great if
someone had an idea how to proceed.
I have two datasets (exemplary illustration):
Dataset 1:
Description1 Firm1 Firm2 Firm3
-----------------------------------------------
xyz 123 456 789
abc 321 654 987
Dataset 2:
Firm Employees TotalAssets
----- --------- -----------
Firm1 123 123
First, I would like to "transpose" this dataset into a vertical order to
merge (later on) dataset1 with dataset2. However, as the dataset contains
string values as well as numerical values, neither the "xpose" nor the
"sxpose" command seems to be applicable.
(Xpose does exactly what I need, however I loose the string values, sxpose
(with force option) gives a "type mismatch" error).
After applying "xpose", Dataset 1 looks a follows: (variable firm was newly
created)
Dataset 2_xpose:
Firm v_1 v_2
---- ----- ---
Firm1 123 321
Firm2 456 654
Firm2 789 987
First Question: Do you have any suggestion how I can prevent that the
string-variable ("description") is lost?
Second question:
I would like to calculate the sum of v_1 and v_2 for each row, how can I
implement this?
Many thanks for your suggestions!
Cheers,
Ansgar
Prof. Ansgar Richter, PhD
Chair of Management & Consulting
Institute of Industrial Services Management
European Business School (EBS)
International University Schloss Reichartshausen
EBS Campus Wiesbaden
S�hnleinstrasse 8D
65201 Wiesbaden
GERMANY
Phone +49 (0) 611 36018 920
Fax +49 (0) 611 36018 902
[email protected]
www.ebs.edu
------------------------------------------------
EBS European Business School gemeinnuetzige GmbH
Amtsgericht Wiesbaden HRB 19951
Umsatzsteuer-ID DE 113891213
Geschaeftsfuehrung: Prof. Dr. Christopher Jahns, Rektor; Sabine Fuchs, Reimar Palte, Prokuristen
Verwaltungsrat: Dr. Hellmut K.Albrecht, Vorsitzender
*
* 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/