plot.coxtp {surtvep}R Documentation

plotting results from a fitted coxtp object

Description

This function creates a plot of the time-varying coefficients from a fitted coxtp model.

Usage

## S3 method for class 'coxtp'
plot(
  x,
  parm,
  CI = TRUE,
  level = 0.95,
  exponentiate = FALSE,
  xlab,
  ylab,
  xlim,
  ylim,
  allinone = FALSE,
  title,
  linetype,
  color,
  fill,
  time,
  ...
)

Arguments

x

model obtained from coxtp.

parm

covariate names fitted in the model to be plotted. If NULL, all covariates are plotted.

CI

if TRUE, confidence intervals are displayed. The default value is TRUE.

level

the level of confidence intervals. The default value is 0.95.

exponentiate

if TRUE, exponential scale of the fitted coefficients (hazard ratio) for each covariate is plotted. If FALSE, the fitted time-varying coefficients (log hazard ratio) are plotted.

xlab

the title for the x axis.

ylab

the title for the y axis.

xlim

the limits for the x axis.

ylim

the limits for the y axis.

allinone

if TRUE, the time-varying trajectories for different covariates are combined into a single plot. The default value is FALSE.

title

the title for the plot.

linetype

the line type for the plot.

color

the aesthetics parameter for the plot.

fill

the aesthetics parameter for the plot.

time

the time points for which the time-varying coefficients to be plotted. The default value is the unique observed event times in the dataset fitting the time-varying effects model.

...

other graphical parameters to plot

Value

A plot is produced, and nothing is returned.

Examples

data(ExampleData)
z <- ExampleData$z
time <- ExampleData$time
event <- ExampleData$event
fit <- coxtp(event = event, z = z, time = time)
plot(fit$lambda1)

[Package surtvep version 1.0.0 Index]