Hey there,
I'm very new to Stata and fairly certain this has a simple solution but i don't seem to find it.
I have a Dataset with 200 different regions and want to create Dummies for each of the regions. I want to label the dummies according to the name of the region.
When doing as below I only get another round of R_1 all the way to R_200 as Dummies. What goes into region in order to not use the numeric labelling but the actual names of the region as a label for the dummies?
levelsof region, local(region)
foreach i of numlist `region' {
gen R_`i'=region==`i'
}
Thanks in advance guys!
Cheers
I'm very new to Stata and fairly certain this has a simple solution but i don't seem to find it.
I have a Dataset with 200 different regions and want to create Dummies for each of the regions. I want to label the dummies according to the name of the region.
When doing as below I only get another round of R_1 all the way to R_200 as Dummies. What goes into region in order to not use the numeric labelling but the actual names of the region as a label for the dummies?
levelsof region, local(region)
foreach i of numlist `region' {
gen R_`i'=region==`i'
}
Thanks in advance guys!
Cheers
Comment