powered by
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, ... )
a ggplot object.
Object from chest_cox, chest_glm, chest_lm, chest_clogit, or chest_nb, including effect estimate values and change-in-estimate values.
chest_cox
chest_glm
chest_lm
chest_clogit
chest_nb
Suppress effect estimate values in plot, default is FALSE.
Add y label.
y
Add x label.
x
Character string for the column name of "Change" in the graph
Set the display format for number in the graph other than the "Change" column. Default: "%.2f"
Set the format for the "Change" column. Default: "%.1f"
Change the + sign before variable names.
+
Adjust vertical distance between values and point marker.
Adjust horizontal distance between values and point marker.
Adjust horizontal alignment.
Change the height of error bars.
Change point marker size.
Change point marker shape.
Change vertical line type.
Change vertical line color.
Change error bar color.
x-axis coordinate for vertical non-effect line, see forestplot.
Change the position of value labels.
Further optional arguments for forestplot.
'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)
Run the code above in your browser using DataLab