I have this:
workday <- data.frame(Measure = c("A", "A", "A"),
Session = c("Welcome", "Class 1", "Lunch Talk"),
Mean = c(7.10, 8.90, 4.47),
Ci95 = c(0.40, 0.56, 0.33))
I need to create a coefficient plot similar to this from the package dwplot
, where y-axis represents different categorical values of Session
. The estimated mean should be a point, and the lower and upper 95% confidence intervals should be plotted as a horizontal line running through its corresponding mean.
I don't have the raw data used to produce the estimated mean ( Mean
) and 95% confidence intervals ( Ci95
) - just the values themselves, as seen in workday
. This is equivalent to a dwplot()
with an argument position = identity
from ggplot2
.
I can get here:
workday %>%
ggplot(aes(x=Mean, y=Session)) +
geom_point(position="identity") +
ggtitle("A")
But it obviously does not include the horizontal confidence interval line I need.
How can I use ggplot2
(or dwplot
) to produce the desired result?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.