I have a dataset at the individual level which includes a variable on education. The variable takes values of 9,10, and 11 for BA, MA, and Ph.D. What I would like to do is to calculate the percentage of individuals with a college education (with a BA, MA, or Ph.D.) at the district level (my dataset includes a variable that shows the respondent's district). I know how to calculate sum or mean using the bysort command but I don't know how to calculate the percentage of several categories. I was wondering if I could get help here.
Related Posts with How to calculate percentage of certain categories using bysort command?
Scaling problems of the y-axis in marginsplot with multiple imputed dataDear all, I would like to make a marginsplot with multiple imputed data. See my syntax below. I am …
How can I generate a list of variables using loop?I want to generate new variables a, c, d I tried the code Code: foreach i in "a" " c" "d " { ge…
Reshape from wide to long with multiple variablesHello everyone, Just trying to puzzle out how to reshape my dataset from wide format to long, but w…
How to test for differences in two WTP distributions using the complete combinatorial approachDear all, Does anyone know how to test for differences in two WTP distributions using the complete …
Graph STATA RR 95% CI with different colors and space between barsHello everybody, I am really struggling to create a graph in STATA that looks like the attached one…
Subscribe to:
Post Comments (Atom)
0 Response to How to calculate percentage of certain categories using bysort command?
Post a Comment