Re: [R] plot CI and mortality rate

2010-10-20 Thread RINNER Heinrich
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 = '')))

Re: [R] plot CI and mortality rate

2010-10-19 Thread Dennis Murphy
Hi: Following up on Ben's suggestion re ggplot2, here's a manufactured example: # Fake data: mortrate <- round(runif(100), 3) dd <- data.frame(rate = mortrate, moe = 1.96 * sqrt(mortrate * (1 - mortrate))/10, hosp = factor(paste('H', 1:100, sep = ''))) dim(dd) [1] 100 3 # Set

Re: [R] plot CI and mortality rate

2010-10-19 Thread Ben Bolker
XINLI LI gmail.com> writes: > > 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? Something lik