plot-methods | R Documentation |
Given an stpm2
fit, return a plot
## 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,...)
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 |
an stpm2
fit
stpm2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.