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.
Related Posts with confidence intervals on proportion
Replace missing values from a different rowI have data that are in long format where one ID has four rows of data. Only one row has information…
How to sort data for distinct IDs with multiple visits and multiple valuesDear all, I have a dataset that has multiple visits for each person. However each person had a diff…
Replacing missing rows of a variableDear All I have a file with more than 1k observations and two variables. One of the variables Y is c…
Correct for Selection on Independent VariablesDear Statalists, I am confused about how to correct for selection on one independent variable. I wa…
Panel VECM in STATA I am giving a general description of the model in a panel setting: Let y, a, b, and z are four vari…
Subscribe to:
Post Comments (Atom)
0 Response to confidence intervals on proportion
Post a Comment