I have this graph that I made using this code:
df3 <- data.frame(outcome=c("Any complication", "Cardiac complication",
"Vascular Complication","Vascular complication",
"Respiratory complication", "Infectious complication",
"Neurological complication"),
index=1:7,
effect=c(-.4, -.25, -.1, .1, .15, .2, .3),
lower=c(-.43, -.29, -.17, -.02, .04, .17, .27),
upper=c(-.37, -.21, -.03, .22, .24, .23, .33))
plot2 <- ggplot(data=df3, aes(y=index, x=effect, xmin=lower, xmax=upper))+
geom_point(shape="diamond", colour="royalblue4", size=5) +
geom_errorbarh(height=.2, colour="royalblue4") +
scale_y_continuous(breaks=1:nrow(df3), labels=df3$outcome) +
labs(title="Adjusted Relative Risk for Complications", x="Relative Risk", y = "Type of complication") +
geom_vline(xintercept=0, color='gray', linetype='dashed', alpha=.5) +
theme_minimal()+
plots_theme
But I would like to add the RR, the 95% confidence interval and some other things there, as shown here:
I could really use some help! Quite new in R here :(




