mc_heatmap()
and mc_trafficlight()
visualize the results of
metaconfoundr()
, summarizing the quality of confounder control in each
study.
mc_heatmap(
.df,
legend_title = "control quality",
sort = FALSE,
by_group = FALSE,
score = c("adequate", "sum", "controlled"),
non_confounders = FALSE
)
mc_trafficlight(
.df,
size = 8,
legend_title = "control quality",
sort = FALSE,
by_group = FALSE,
score = c("adequate", "sum", "controlled"),
non_confounders = FALSE
)
A data frame, usually the result of metaconfoundr()
The legend title
Logical. Sort by confounder score? Calculated by score_control()
Logical. If sorted, sort within domain?
The approach used to calculate the score. adequate
tests if
the study controlled at a strictly adequate level. sum
treats
control_quality
as an ordinal integer, summing it's values such that a
higher score has better control overall. controlled
tests if any control,
including some concerns
control, is present.
Logical. Include non-confounders? Default is FALSE
.
The size of the points in the traffic light plot
a ggplot
Other plots:
facet_constructs()
,
geom_cochrane()
,
scale_fill_cochrane()
,
theme_mc()
ipi %>%
metaconfoundr() %>%
dplyr::mutate(variable = stringr::str_wrap(variable, 10)) %>%
mc_heatmap() +
theme_mc() +
facet_constructs() +
ggplot2::guides(x = ggplot2::guide_axis(n.dodge = 2))
ipi %>%
metaconfoundr() %>%
mc_trafficlight() +
geom_cochrane() +
facet_constructs() +
scale_fill_cochrane() +
theme_mc() +
ggplot2::guides(x = ggplot2::guide_axis(n.dodge = 2))