plot_shhr: Plot of survival, hazard and hazard ratio of two groups as a...

View source: R/additional_functions_1-1.R

plot_shhrR Documentation

Plot of survival, hazard and hazard ratio of two groups as a function of time

Description

A convenience function that uses the generic plot function in the nph package to plot the three functions in a layout of 3 columns and 1 row.

Usage

plot_shhr(A, B, main = "", xmax = NULL, ymax_haz = NULL, ymax_hr = NULL)

Arguments

A

An object of class mixpch, resembling the survival function in treatment group 0

B

An object of class mixpch, resembling the survival function in treatment group 1

main

An overall title for the plot

xmax

A maximum value for the x-axis. The plot is drawn using xlim = c(0, xmax)

ymax_haz

A maximum value for the y-axis for the hazards plot. The plot is drawn using ylim = c(0, ymax_haz)

ymax_hr

A maximum value for the y-axis for the hazards ratio plot. The plot is drawn using ylim = c(0, ymax_hr)


nph documentation built on May 17, 2022, 1:06 a.m.