plot-methods: plots for an stpm2 fit

Description Usage Arguments Methods See Also

Description

Given an stpm2 fit, return a plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    ## 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=incrVar(var),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=incrVar(var),times=NULL,...)

Arguments

x

an stpm2 object

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 (add=TRUE) or make a new plot (add=FALSE) (default=FALSE)

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.

...

additional arguments (add to the plot command)

Methods

x = "stpm2", y = "missing"

an stpm2 fit

See Also

stpm2


rstpm2 documentation built on Nov. 2, 2018, 1:05 a.m.