Hi there
Apologies in advance if this has already been answered elsewhere.
I have a dataset of many numerators and denominators and I want to calculate the proportions and the 95% confidence intervals around those proportions.
For example:
* Example generated by -dataex-. For more info, type help dataex
clear
input float(numerator denominator)
21 142
56 341
34 234
65 432
34 345
7 543
67 765
78 234
5 423
43 234
23 254
4 653
21 543
45 654
65 162
end
gen proportion = numerator/denominator
[/CODE]
I presume Stata must have a function command for the calculation of the 95% confidence intervals but I can't find it anywhere. Any advice greatly appreciated.
To be clear, I need to create the confidence intervals in the dataset itself (as new variables) rather than in the output window, as I intend to visualise them in a table/graph.
With thanks.
0 Response to confidence intervals on proportion
Post a Comment