[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: how to distinguish observations with the same code
you could just create a variable "country" in both data sets with "1" for
country a and "2" for b, afterwards you append the data. Then you can
identify each observation as a combination of "code" and "country" - so
you could also generate a new identifier.
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.?
Deutsches Institut für Wirtschaftsforschung (DIW Berlin)
German Institute for Economic Research
14195 Berlin, Germany
* For searches and help try: