------------------------------------------------------------------------------------------------------------- name: log: C:\MyDocs\MPH\LectureNotes\ClassDoLogData\logistic regression\proportions.log log type: text opened on: 9 Feb 2011, 11:06:24 . * proportions.log . * . * Illustrate Wald, Wilson and exact confidence intervals . * . use proportions.dta . list +-----------------+ | fate patients | |-----------------| 1. | 0 10 | 2. | 1 10 | +-----------------+ . ci fate [freq = patients], binomial wald -- Binomial Wald --- Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- fate | 20 .5 .1118034 .2808694 .7191306 . ci fate [freq = patients], binomial wilson ------ Wilson ------ Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- fate | 20 .5 .1118034 .299298 .700702 . replace patients = 18 in 1 (1 real change made) . replace patients = 2 in 2 (1 real change made) . list +-----------------+ | fate patients | |-----------------| 1. | 0 18 | 2. | 1 2 | +-----------------+ . ci fate [freq = patients], binomial wald -- Binomial Wald --- Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- fate | 20 .1 .067082 0 .2314784* (*) The Wald interval was clipped at the lower endpoint . ci fate [freq = patients], binomial wilson ------ Wilson ------ Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- fate | 20 .1 .067082 .0278665 .3010336 . return list scalars: r(ub) = .3010336452284873 r(lb) = .0278664812137682 r(se) = .0670820393249937 r(mean) = .1 r(N) = 20 . display r(ub) .30103365 . log close name: log: C:\MyDocs\MPH\LectureNotes\ClassDoLogData\logistic regression\proportions.log log type: text closed on: 9 Feb 2011, 11:06:24 -------------------------------------------------------------------------------------------------------------