library(readr)
library(tidyverse)
mydata <- read_csv("Reg_results.csv")
coef_plot <-mydata %>%
mutate(Group = case_when(
Group == "moderate" ~ "Moderate",
Group == "negative" ~ "Negative",
Group == "neg_pos" ~ "Negative & Positive"),
Covariate = case_when(
Covariate == "AGEGRP5" ~ "Age - 65+",
Covariate == "AGEGRP1" ~ "Age - 25 - 34",
Covariate == "RELIG" ~ "Religiosity",
Covariate == "RELIG_KID" ~ "Child \n Religious Faith",
Covariate == "PCFREQ2"~ "Computer Use",
Covariate == "EDU3GRP2"~ "College or More",
Covariate == "EDU3GRP1" ~ "High School",
Covariate == "EMP3GRP1" ~ "Currently Working"))%>%
ggplot(aes(y = Covariate, x = estimate, pch = Group,label = OR)) +
geom_point(aes(y = Covariate, x=estimate), color= "#FF6666") +
geom_errorbarh(aes(xmax = Upper, xmin = Lower,height = .12), color ="#FF6666",size = 0.6) +
geom_vline(xintercept =0, linetype = "dashed") +
scale_shape_manual(values = c(0,2,19)) +
geom_text(size = 3, nudge_x = 2,vjust = -0.25) +
facet_grid(.~Group) +
scale_x_continuous(name ="Regression Coefficients with Odds Ratio", limits=c(-5,5)) +
theme(legend.position = "bottom")
coef_plot
Pullman, A., Chen, M., Zou, D., Hives, B., & Liu, Y. (2018). Researching multiple publics through latent profile analysis: Similarities and differences in science and technology attitudes in China, Japan, South Korea and the United States. Public Understanding of Science, 28(2), 130-145. DOI: 10.1177/0963662518791902