recoding might work (you may have noticed that I'm not a stata expert),
but like Nick Cox mentioned, it's important to me that I can easily look
up what I did months later, and for that I don't think recoding is very
clear.
But, what would happen if i would use recode, and some of the old country
specific codes are the same as the new origin (country group)codes? (this
is, in fact, the case).
example (fake):
natio 1 = south africa
natio 2 = somalia
natio 3 = argentina
natio 4 = russia
natio 5 = slovenia
natio 6 = the netherlands
-gen origin = natio
-recode origin 1 2=4 3=3 4 5=2 6=1
now I should have:
origin 1 (netherlands) includes natio 6(netherlands)
origin 2 (eastern europe) includes natio 4, 5 (russia, slovenia)
origin 3 (latin america) includes natio 3 (argentina)
origin 4 (africa) includes natio 1, 2 (south africa, somalia)
but I think I would have:
origin 1 does not exist, it's overwritten because it first became 4, but
then 4 was recoded in 2, so that now origin 2 (eastern europe) includes
not only natio 4 and 5, but also natio 1 and 2 (africa)...
etc.
of course it's easy to check this out in a little fake dataset. But the
point I'd like to make is that if this is true, recode is not suitable for
data that are not coded in the same sequence as you want to group them in
(in my example the two neighbouring countries do not have neighboring
codes).
Don't worry, it's not true. Unlike in SPSS, in Stata you can easily recode
things like "1=2 2=1" , because the whole command gets evaluated at the
same time, and not from left to right.