Hi everybody, I would like to estimate prevalence ratio and confidence intervals. Here, I detail about confidence intervals for proportions and five different statistical methodologies for deriving confidence intervals for proportions that you, especially if you are in healthcare data science field, should know about. The "exact" method uses the F distribution to compute exact (based on the binomial cdf) intervals; the "wilson" interval is score-test-based; and the "asymptotic" is the text-book, asymptotic normal interval. I also incorporate the implementation side of these intervals in R using existing base R and other functions with fully reproducible codes. Doing this in SPSS is quite easy. However, I did not use the predict command to get the confidence intervals. In case the observed prevalence equals 100% (ie, x == n), a lower one-sided confidence interval is returned. $\begingroup$ Should the "Compute the CI" code be p_hat + c(-1.96,1.96)*sqrt(p_hat*(1-p_hat)/n) for a 95% confidence interval (where c(-1.96,1.96) = -/+ the value of z) ? Let us denote the 100(1 − α∕ 2) percentile of the standard normal distribution as z α∕ 2 . I need it to be in a table because I will refer to it later in plotly. @jason-todd note the correction needed. In case the observed prevalence equals 0% (ie, x == 0), an upper one-sided confidence interval is returned. The number in different classes cannot be added to reach a total number of babies/fetuses. Just forgot to include the z. I am trying to estimate coefficients with poisson regression and then get standard errors that are adjusted for heteroskedasticity. I have got the fitted values and the confidence intervals as vectors. Here is some summary of the data. Calculation of Prevalence and their 95% Confidence Intervals In EUROCAT prevalence calculations, a baby/fetus with several anomalies is counted once within each class of anomaly. After we found a point sample estimate of the population proportion, we would need to estimate its confidence interval. Following Agresti and Coull, the Wilson interval is to be preferred and so is the default. Risk age mean sd n 1 u50 0.37 0.19 1776 2 u50 0.49 0.25 1776 3 u50 0.54 0.26 1776 1 o50 0.45 0.36 1776 2 o50 0.52 0.42 1776 3 o50 0.67 0.41 1776 confidence-interval. So, for each combination of age group and risk score, I would like to estimate the mean prevalence and a confidence interval for it. I would like to get the means and confidence intervals in a table format for each of these combinations for the variables mean_PctPasses to mean_Rate and save the result so it is in a table. Now, I would like to learn how to do a poisson regression with robust variance. EUROCAT prevalence is always cited as per 10,000 births. $\endgroup$ – eipi10 Apr 17 '16 at 4:46 $\begingroup$ No need to do that @eipi10. A baby is counted once only in any given prevalence. Using this dataset I have 2 grouping variables "Group" and "Time". What I am tering to say is that abline(mod) does not work for me. I tried to do a log-binomial regression, but there was a failure of convergence. include.x I used optim command to obtain the maximum likelihood estimates using some starting values. So, I obtained the betas and then the fitted values and the confidence intervals. In all other cases, two-sided confidence intervals are returned.