You could also use lattice + Hmisc: # Fake data (taken from Dennis Murphy's reply): mortrate <- round(runif(100), 3) moe = 1.96 * sqrt(mortrate * (1 - mortrate))/10 dd <- data.frame(rate = mortrate, CI.lower = mortrate - moe, CI.upper = mortrate + moe, hosp = factor(paste('H', 1:100, sep = ''))) # using packages lattice and Hmisc: require(lattice) require(Hmisc) dd$hosp.sort <- reorder(dd$hosp, dd$rate) Dotplot(hosp.sort ~ Cbind(mortrate, CI.lower, CI.upper), data = dd, abline = list(v = mean(mortrate), col = "red"))
HTH Heinrich. > -----Ursprüngliche Nachricht----- > Von: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] Im Auftrag von XINLI LI > Gesendet: Mittwoch, 20. Oktober 2010 02:00 > An: R-help@r-project.org > Betreff: [R] plot CI and mortality rate > > > Dear R Users: > > I have the individual mortality rate and 95% CI of 100 > hospitals, > how to do the plot with the individual hospital in the > Yaxis, and the > mortality rate and 95% CI in the Xais and a overall mean as a > reference > line? > > Thanks and regards, > > Xin > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide > commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.