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
dummy for interaction variables in regressionHi Here I am again i.wealthindex*i.educationlevel === What is the correct stata command / syntha…
storing logit regression coefficients as new variable?Hi everyone! My question is as stated in the title: I'm running a logit regression and am looking to…
Transform wide Datastream format to longDear all, For the purpose of my research in which I wish to analyze the effect of buy/sell recommen…
counting total of variable based on other variableHello, i want to count the total M&A's (labeled as 1 in maactive) of a firm (based on gvkey) en…
Insignificant OLS results but significant IV regression resultsDear all, I do a regression (Y is a dependent variable and X is an independent variable) OLS gets …
Subscribe to:
Post Comments (Atom)
0 Response to Calculating proportions of several categories
Post a Comment