Stata
Posts  1 - 1  of  1
Mirko
Dear fellow Stata users,

I have a bit of a problem: My data is ordered as follows: Countries, a differing number of subgroups for each country, each subgroup has been observed for a couple of years, usually decades.
Each subgroup has been given a number that is different for every subgroup through the sample. However, while I would like to number each subgroup, I would like to start again counting with "1" when the subgroup belongs to a new country.

The rationale behind this exercise is, that reshape wide blows the data set up to enormous size if my j variable becomes keeps increasing.

Thank you very much in advance.

Best regards
M.
Save
Cancel
Reply
 
x
OK