This document contains the plot of predicted probabilities from each individual study, as well as the weighted average effect, from the cross-sectional analyses.
The following packages were used to generate this figure:
library(tidyverse)
library(metafor)
library(here)
The files needed for this table are available at osf.io/mzfu9 in the Meta Analysis Output folder.To see how these objects were created, see the meta-analysis script titled smoker_meta-analysis.R
that are available at osf.io/9s52x.
load(here("behavior/created data/plot_smoker.Rdata"))
We plot the values.
smoker.plot %>%
ggplot(aes(x = x, y = predicted)) +
geom_ribbon(aes(ymin=lower, ymax=upper), fill="black", alpha=.15,
data = weighted.vals)+
geom_line(aes(color = study), lty="dashed") +
geom_line(data = weighted.vals, color="black") +
scale_x_continuous("Neuroticism")+
scale_y_continuous("Probability of \n being a current smoker") +
facet_wrap(~group)+
theme_minimal()+
theme(legend.position = "bottom")