Create a forest plot using outputs from 'metafor' package
forest_plot(
estimates = NULL,
estimate_ci_ll = NULL,
estimate_ci_ul = NULL,
point_size_range = c(2, 10),
error_bar_size = 1,
error_bar_tip_height = 0.3,
weights = NULL,
diamond_x = NULL,
diamond_ci_ll = NULL,
diamond_ci_ul = NULL,
diamond_height = 1.2,
diamond_gap_height = 0.3,
diamond_1_tip_at_top_y = -0.5,
diamond_colors = "black",
study_labels = NULL,
diamond_labels = NULL,
diamond_label_size = 6,
diamond_label_hjust = 0,
diamond_label_fontface = "bold",
diamond_estimate_label_hjust = 0,
diamond_estimate_label_size = 6,
diamond_estimate_label_fontface = "bold",
round_estimates = 2,
x_axis_title = "Observed Outcome",
vline_size = 1,
vline_intercept = 0,
vline_type = "dotted",
study_label_hjust = 0,
study_label_begin_x = NULL,
study_label_begin_x_perc = 60,
study_label_size = 6,
study_label_fontface = "plain",
estimate_label_begin_x = NULL,
estimate_label_begin_x_perc = 25,
estimate_label_hjust = 0,
estimate_label_size = 6,
estimate_label_fontface = "plain",
x_axis_tick_marks = NULL,
legend_position = "none",
plot_margin = NULL
)
default = NULL
default = NULL
default = NULL
default = c(2, 10)
default = 1
default = 0.3
default = NULL
default = NULL
default = NULL
default = NULL
default = 1.2
default = 0.3
default = -0.5
default = "black"
default = NULL
default = NULL
default = 6
default = 0
default = "bold"
default = 0
default = 6
default = "bold"
default = 2
default = "Observed Outcome"
default = 1
default = 0
default = "dotted"
default = 0
default = NULL
default = 60
default = 6
default = "plain"
default = NULL
default = 25
default = 0
default = 6
default = "plain"
default = NULL
default = "none"
default = NULL
# \donttest{
forest_plot(
estimates = c(2, 3, 4),
estimate_ci_ll = c(1, 2, 3),
estimate_ci_ul = c(3, 4, 6),
weights = 1:3,
diamond_x = 2,
diamond_labels = "RE",
diamond_ci_ll = 1.8,
diamond_ci_ul = 2.2,
estimate_label_begin_x_perc = 40,
x_axis_tick_marks = seq(-2, 6, 2))
# }
Run the code above in your browser using DataLab