I am using Stata 14.2
I have a categorical variable district_name and another categorical variable store_name in each district. I encoded district to get the number of stores in each district (encode dist_name, gen(dist_n)). Now my new variable looks like this:
Dist_n Freq (no of store names)
DistA 10
DistB 1200
DistC 450
DistD 80
DistE 690
Is it possible for me to generate a new variable that represents a range of the frequency of stores in districts. Ex.
District_size N
0 to 99 stores 2
99 to 999 stores 2
1000+ stores 1
I have a categorical variable district_name and another categorical variable store_name in each district. I encoded district to get the number of stores in each district (encode dist_name, gen(dist_n)). Now my new variable looks like this:
Dist_n Freq (no of store names)
DistA 10
DistB 1200
DistC 450
DistD 80
DistE 690
Is it possible for me to generate a new variable that represents a range of the frequency of stores in districts. Ex.
District_size N
0 to 99 stores 2
99 to 999 stores 2
1000+ stores 1
Comment