Year = c(0,1,2,3)
Outcome = c(NA, 1.3, 1.5, 1.7,
1, 1.2, 1.4,1.6,
1.1, 1.3, 1.7, 1.9)
Treatment = c("Comparison","Comparison","Comparison","Comparison",
"Control", "Control","Control","Control",
"Treatment", "Treatment", "Treatment", "Treatment")
dat = data.frame(Year, Outcome, Treatment)
dat$Treatment = factor(dat$Treatment, levels = c("Treatment", "Comparison", "Control"))
ggplot(data = dat, aes(x = Year, y = Outcome, color = Treatment)) +
geom_line(aes(linetype=Treatment),size=2) +
geom_point(size = 6) +
ylim(0.8, 2.2) +
scale_linetype_manual(values=c("solid", "dotted", "solid")) +
scale_color_manual(values = c("blue", "black", "red" ) ) +
theme(legend.position = c(0.8, 0.2), text = element_text(size=20),
legend.title=element_blank())