Hello,

I am trying to compute confidence intervals for proportions (number of cases / total) on each observations of a simple database using the ci proportions / cii proportions command.
Here is my code and the database:

Code:
input str7 continent cases total
Africa 544 863
America 43 172
Asia 372 734
Oceania 19 25

local contlist Africa America Asia Oceania
    
    foreach continent of local contlist {
     ci proportions total cases if continent == "`continent'"    
    
}
This gives an output with empty values. I have also tried with cii proportions, which was also unsuccesful.

I can get the results one by one, by typing the following command - for Africa for instance - but I would like to have it automatized:

Code:
cii proportions 863 544

Does anyone have a idea on how to solve this?

I am using Stata 14.

Many thanks in anticipation