Statalist The Stata Listserver


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

st: how to distinguish observations with the same code


From   "natalie chan" <[email protected]>
To   [email protected]
Subject   st: how to distinguish observations with the same code
Date   Mon, 7 May 2007 13:59:16 +0100

Dear statalisters,

This may be an elementary question but I could not find a solution in
Stata and the list archives, so here I am.

I am working with two large datasets, each including more than
100,000 firms from two countries respectively. Each firm is assigned a
code number. so the structure of both datasets is as follows:

Code   sales profit turnover

1              3        4         6

2              3        5         6

3              7        4         2

…

1000000   4       5         8

I have put the two datasets into one dataset using "Append", however,
how can I distinguish the firms from different regions since they have
the same code? Is it possible to generate a new variable with the
prefix before the code, for example, "german1"  "france1" etc.?


Thanks.

Natalie

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index