Learn R Programming

survminer (version 0.3.1)

ggforest: Drawing Forest Plot for CoxPH model

Description

Drawing Forest Plot for CoxPH model

Usage

ggforest(model, alpha = 0.05, plot.title = "Forest plot for coxph model",
  ggtheme = theme_survminer(), palette = c("black", "red4"),
  xlab = "Hazard ratio", ...)

Arguments

model

an object of class coxph.

alpha

significance level for coloring.

plot.title

legend title.

ggtheme

function, ggplot2 theme name. Default value is theme_classic2. Allowed values include ggplot2 official themes: see theme.

palette

the color palette to be used for coloring of significant variables.

xlab

Label in OX axis.

...

further arguments passed to the function ggpar for customizing the plot.

Value

return an object of class ggplot

Examples

Run this code
require("survival")
model <- coxph( Surv(time, status) ~ sex + rx + adhere,
                data = colon )
ggforest(model)

Run the code above in your browser using DataLab