Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lines

S3 methods for lines


Description

S3 methods for lines

Usage

## S3 method for class 'stpm2'
lines(x, newdata = NULL, type = "surv", col = 1, ci.col= "grey",
lty = par("lty"), ci = FALSE, rug = FALSE, var = NULL,
exposed = incrVar(var), times = NULL,
type.relsurv = c("excess", "total", "other"),
ratetable = survival::survexp.us, rmap, scale = 365.24, ...)
## S3 method for class 'pstpm2'
lines(x, newdata = NULL, type = "surv", col = 1,
ci.col= "grey",
lty = par("lty"), ci = FALSE, rug = FALSE, var = NULL,
exposed = incrVar(var), times = NULL, ...)

Arguments

x

an stpm2 object

newdata

required list of new data. This defines the unexposed newdata (excluding the event times).

type

specify the type of prediction

col

line colour

lty

line type

ci.col

confidence interval colour

ci

whether to plot the confidence interval band (default=TRUE)

rug

whether to add a rug plot of the event times to the current plot (default=TRUE)

var

specify the variable name or names for the exposed/unexposed (names are given as characters)

exposed

function that takes newdata and returns the exposed dataset. By default, this increments var

times

specifies the times. By default, this uses a span of the observed times.

type.relsurv

type of predictions for relative survival models: either "excess", "total" or "other"

scale

scale to go from the days in the ratetable object to the analysis time used in the analysis

rmap

an optional list that maps data set names to the ratetable names. See survexp

ratetable

a table of event rates used in relative survival when type.relsurv is "total" or "other"

...

additional arguments (add to the plot command)


rstpm2

Smooth Survival Models, Including Generalized Survival Models

v1.5.2
GPL-2 | GPL-3
Authors
Mark Clements [aut, cre], Xing-Rong Liu [aut], Benjamin Christoffersen [aut], Paul Lambert [ctb], Lasse Hjort Jakobsen [ctb], Alessandro Gasparini [ctb], Gordon Smyth [cph], Patrick Alken [cph], Simon Wood [cph], Rhys Ulerich [cph]
Initial release
2021-02-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.