plot-methods {rstpm2} | R Documentation |
plots for an stpm2 fit
Description
Given an stpm2
fit, return a plot
Usage
## S4 method for signature 'stpm2'
plot(x,y,newdata,type="surv",
xlab="Time",line.col=1,ci.col="grey",
add=FALSE,ci=TRUE,rug=TRUE,
var=NULL,exposed=NULL,times=NULL,...)
## S4 method for signature 'pstpm2'
plot(x,y,newdata,type="surv",
xlab="Time",line.col=1,ci.col="grey",
add=FALSE,ci=TRUE,rug=TRUE,
var=NULL,exposed=NULL,times=NULL,...)
Arguments
x |
an |
y |
not used (for generic compatibility) |
newdata |
required list of new data. This defines the unexposed newdata (excluding the event times). |
type |
specify the type of prediction |
xlab |
x-axis label |
line.col |
line colour |
ci.col |
confidence interval colour |
ci |
whether to plot the confidence interval band (default=TRUE) |
add |
whether to add to the current plot ( |
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 |
times |
specifies the times. By default, this uses a span of the observed times. |
... |
additional arguments (add to the |
Methods
- x = "stpm2", y = "missing"
an
stpm2
fit