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
intersection variable Code: reghdfe cases_normed i.days#bus_policy_open_risk cases_normed_delay_14days cases_normed_delay…
Best variables for a regressionHello everyone! I am new here, I hope to write the question in the right session. I have to do a log…
Specifying second order derivatives in 'gmm'Hello, I am running a 'gmm' estimation and need to specify constraints on the coefficients. Because…
Creating a new variable that combines two variables on STATA 17I have two variables, q5 and q6. I would like to keep all values from q5 and some values from q6 and…
Problem with ‘marginsplot’ when using margins command with multiple at() predictionsI want to create a "marginsplot" using a continuous independent variable on the x-axis, with predict…
Subscribe to:
Post Comments (Atom)
0 Response to confidence intervals on proportion
Post a Comment