Learn R Programming

chest (version 0.3.7)

chest_forest: Plot effect estimates and change-in-estimate values (forestplot type)

Description

'chest_forest' plots effect estimates and change-in-estimate values with forestplot package.

Usage

chest_forest(
  data,
  var_lab = "Variables",
  est_lab = "Estimate (95% CI)",
  change_lab = "Change, %",
  digits = "%.2f",
  digits_change = "%.1f",
  hrzl_lines = gpar(col = "#444444"),
  plus = "  + ",
  ...
)

Value

A table with effect estimates and their changes at all steps.

Arguments

data

Object from chest_cox, chest_glm, chest_lm, chest_clogit, or chest_nb, including effect estimate values and change-in-estimate values.

var_lab

Character string for the column name of variables in the graph.

est_lab

Character string for the column name of effect estimates.

change_lab

Character string for the column name of "Changes".

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"

hrzl_lines

A logic to include or remove horizontal line.

plus

Change the + sign before variable names.

...

Further optional arguments for forestplot.

See Also

'forestplot'

Examples

Run this code
vlist <- c("Age", "Sex", "Married", "Cancer", "CVD", "Education", "Income")
results <- chest_cox(crude = "Surv(t0, t1, Endpoint) ~ Diabetes", xlist = vlist, data = diab_df)
chest_forest(results)

Run the code above in your browser using DataLab