Hello dear all,
I am facing a serious problem to use the command proportion. I have a series of neighborhoods (psu) , within milieu which is also within a province. I am trying to get the proportion of people of the same tribe in each neighborhood in vain. In my dataset tribe is coded as 3digits figure. Whenever I try
by prov milieu psu, sort: prop tribe
Stata refuses to apply prop and responds that proportion does not work with "b". When I change and
proportion (tribe), over (psu) Stata says I have too much options while the same command works with a variable like "sex" with only two options instead of "psi" which corresponds to 660 modalities. I have tried to write loops for that but still I cannot manage to get the right one. I will much appreciate you help.
Thanks in advance
Related Posts with Calculating proportions of several categories
VAR or VECM- which one to use?If I have 4 variables in a model and I want to check for causality between the two variables say X a…
Trying to replace a variable with a new generated variableHello, I am trying to replace a variable so that when I create a graph for GDPpc it shows GDPpc belo…
hyperlink in Stata graphHi, I would like to include a hyperlink in the footnote of a graph. For instance: clear all webus…
Parallel Trends Assumption in Difference-in-Differences (DiD)Hello guys, recently I´m doing some research on the risk behavior of banks during the low interest …
Right way to extract Confidence Intervals of coefficients of interaction termDear all, I was wondering about what would the right way to form a list or matrix or a variable (ei…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating proportions of several categories
Post a Comment