Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73368

Generating new variables

$
0
0
Hi folks,

Probably a simple question to answer for some but I'm having trouble with it. I've a dataset with two variables. One is the the NACE code (111-9700) of a specific business. The other is the region were that business is located (1-36).

I would like to create two variables with this data. The first is the number of regions a specific NACE code is in, and the second is the total number of businesses for that specific NACE code.

So for instance I want to generate something like,
NACE (3030) Region(24) NACECL(150)
So NACE code 3030 is in 24 regions with a total of 150 firms.

Also when I have something like this generated for each code, how would I collapse the dataset to just remove any duplicates?

All help welcome!

Thanks,
Sean

Viewing all articles
Browse latest Browse all 73368


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>