hazard_plot: hazard_plot

Description Usage Arguments Value

View source: R/hazard_plot.R

Description

A function to be used with data* passed through prep_all_hazards. It plots the hazard-ratio curves for indicated treatments. Alternatively, one can use a survnma object directly. The function will then calculate the hazards internally. Execution is identical in either case.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
hazard_plot(
  data = NULL,
  treatments = NULL,
  reference = NULL,
  timesteps = seq(0, 30),
  study_labs = NA,
  colors = NULL,
  xlab = "",
  ylab = "",
  xlim = NULL,
  ylim = NULL,
  title = "",
  interval = FALSE
)

Arguments

data

a dataframe obtained directly through function prep_all_hazards or a survnma object

treatments

a list of treatments you want to plot

reference

string representing reference treatment

timesteps

Vector of evaluation times. Should be of length > 2

study_labs

a collection of labels for the studies

colors

a collection of colors for graphing

xlab

a string to be used for labelling the x-axis

ylab

a string to be used for labelling the y-axis

xlim

specifying a limit for the x-axis

ylim

specifying a limit for the y-axis

title

title to be used for the hazard plot

interval

boolean whether you want a credible interval on the curve

Value

a figure of required hazard-ratio plots


certara/survivalnma documentation built on Oct. 17, 2020, 12:34 a.m.