Hi
I'm building som code to summarize some survey proportions.
And hence I use proportion to get it (I've ignored the svy prefix in the example below).:
And then I get:
But what I actually want is only the proportions of foreign == Foreign in a way such that the values of rep78 can used to lookup the proper proportion.
Is there a (simple) way of coding this (note that in my case foreign can have more than 2 values and I do only want to look at one of them)?
I'm building som code to summarize some survey proportions.
And hence I use proportion to get it (I've ignored the svy prefix in the example below).:
Code:
sysuse auto, clear keep if rep78 >2 proportion foreign, over( rep78)
Code:
Proportion estimation Number of obs = 59 Domestic: foreign = Domestic Foreign: foreign = Foreign 3: rep78 = 3 4: rep78 = 4 5: rep78 = 5 -------------------------------------------------------------- Over | Proportion Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ Domestic | 3 | .9 .0557086 .7227598 .9688186 4 | .5 .1212678 .2746861 .7253139 5 | .1818182 .1219673 .0412781 .5342249 -------------+------------------------------------------------ Foreign | 3 | .1 .0557086 .0311814 .2772402 4 | .5 .1212678 .2746861 .7253139 5 | .8181818 .1219673 .4657751 .9587219 --------------------------------------------------------------
Is there a (simple) way of coding this (note that in my case foreign can have more than 2 values and I do only want to look at one of them)?
Comment