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
Minutes off in datetime formattingHello, I am working on a load profile with 30-minute invervals of electricity demand that I wish to…
Combine cases, but keep values from each.I'd like to combine cases, but in an unusual way -- by keeping values from each. For example, start …
Adoupdate not working in new installationDear users, I recently installed Stata 15 in a new machine with Windows 10. I first download -ftools…
Creating a binary varible from a date variableI would like to create a variable where there is only two variables (0=heating, 1=non-heating) I ha…
How to execute a Matlab script from StataHi all, I'd like to run a Matlab script from within my Stata Do-File. Haven't done this before, but…
Subscribe to:
Post Comments (Atom)
0 Response to confidence intervals on proportion
Post a Comment