chest_forest: Plot effect estimates and change-in-estimate values...

View source: R/chest_forest.R

chest_forestR Documentation

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 = "  + ",
  ...
)

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.

Value

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

See Also

'forestplot'

Examples

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)

chest documentation built on March 31, 2023, 10:02 p.m.