Hello,
I am using the newest version of Stata (14.1), and I need help with getting a sorted two-way table. In order to get the table I wanted for my data set, I used the following code: "svy: tab county smoker2, row". This gave me the proportion of current smokers in each county in Missouri. However, the results are not in order and there are a lot of counties in Missouri. For my assignment, I need the 5 counties with the lowest and highest smoking prevalence. Is there any way to both get the total proportion of smokers in each county (I used the option "row" for this) and have a sorted table in the results? I can't find the answer to this anywhere online. Thank you very much for your help.
Kelsey
I am using the newest version of Stata (14.1), and I need help with getting a sorted two-way table. In order to get the table I wanted for my data set, I used the following code: "svy: tab county smoker2, row". This gave me the proportion of current smokers in each county in Missouri. However, the results are not in order and there are a lot of counties in Missouri. For my assignment, I need the 5 counties with the lowest and highest smoking prevalence. Is there any way to both get the total proportion of smokers in each county (I used the option "row" for this) and have a sorted table in the results? I can't find the answer to this anywhere online. Thank you very much for your help.
Kelsey
Comment