Given an stpm2
fit, return a plot
# S4 method for stpm2
plot(x,y,newdata,type="surv",
xlab="Time",line.col=1,ci.col="grey",
add=FALSE,ci=TRUE,rug=TRUE,
var=NULL,exposed=incrVar(var),times=NULL,...)
# S4 method for pstpm2
plot(x,y,newdata,type="surv",
xlab="Time",line.col=1,ci.col="grey",
add=FALSE,ci=TRUE,rug=TRUE,
var=NULL,exposed=incrVar(var),times=NULL,...)
an stpm2
object
not used (for generic compatibility)
required list of new data. This defines the unexposed newdata (excluding the event times).
specify the type of prediction
x-axis label
line colour
confidence interval colour
whether to plot the confidence interval band (default=TRUE)
whether to add to the current plot (add=TRUE
) or make a new
plot (add=FALSE
) (default=FALSE)
whether to add a rug plot of the event times to the current plot (default=TRUE)
specify the variable name or names for the exposed/unexposed (names are given as characters)
function that takes newdata and returns the exposed
dataset. By default, this increments var
specifies the times. By default, this uses a span of the observed times.
additional arguments (add to the plot
command)
an stpm2
fit