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" <>
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.?



*   For searches and help try:

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