chest_plot | R Documentation |
Plot effect estimate and change-in-estimate values (ggplot type)
chest_plot(
data,
no_values = FALSE,
ylab = NULL,
xlab = NULL,
change_lab = "Change, %",
digits = "%.2f",
digits_change = "%.1f",
plus = " + ",
nudge_y = 0.4,
nudge_x = NULL,
hjust = 0.5,
height = 0.06,
point_size = 3,
point_shape = 15,
vline_type = "dashed",
vline_color = "grey50",
ebar_color = "grey50",
zero = 1,
value_position = NULL,
...
)
data |
Object from |
no_values |
Suppress effect estimate values in plot, default is FALSE. |
ylab |
Add |
xlab |
Add |
change_lab |
Character string for the column name of "Change" in the graph |
digits |
Set the display format for number in the graph other than the "Change" column. Default: "%.2f" |
digits_change |
Set the format for the "Change" column. Default: "%.1f" |
plus |
Change the |
nudge_y |
Adjust vertical distance between values and point marker. |
nudge_x |
Adjust horizontal distance between values and point marker. |
hjust |
Adjust horizontal alignment. |
height |
Change the height of error bars. |
point_size |
Change point marker size. |
point_shape |
Change point marker shape. |
vline_type |
Change vertical line type. |
vline_color |
Change vertical line color. |
ebar_color |
Change error bar color. |
zero |
x-axis coordinate for vertical non-effect line, see forestplot. |
value_position |
Change the position of value labels. |
... |
Further optional arguments for forestplot. |
a ggplot object.
'ggplot2'
vlist <- c("Age", "Sex", "Married", "Education", "Income")
results <- chest_glm(
crude = "Endpoint ~ Diabetes",
xlist = vlist, na_omit = TRUE, data = diab_df
)
chest_plot(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.