plot.p3state {p3state.msm}R Documentation

Plot Method for an p3state object

Description

Plot method for an object of class ‘p3state’. Draws the estimated transition probabilities, bivariate distribution of the gap times and marginal distribution of the second gap time (the last two only available for the progressive three-state model)

Usage

## S3 method for class 'p3state'
plot(x, plot.trans = NULL, plot.marginal = NULL,
plot.bivariate = NULL, time1, time2, xlab, ylab, zlab, col, col.biv = NULL, ...)

Arguments

x

An object of class ‘p3state’.

plot.trans

Graphical output for the transition probabilities. By default, plot.trans=FALSE. Possible values are: "all", "P11", "P12", "P22" and "P23".

plot.marginal

Graphical output for the marginal distribution of the second time (only available for the progressive three-state model). By default, plot.marginal=FALSE.

plot.bivariate

Graphical output for the bivariate distribution (only available for the progressive three-state model). By default, plot.bivariate=FALSE.

time1

The first time for obtaining estimates of the transition probabilities, bivariate distribution function. NULL is equivalent to 0.

time2

The second time for obtaining estimates of the bivariate distribution function.

xlab

x-axix label.

ylab

y-axix label.

zlab

z-axix label (only for the bivariate distribution).

col

Colour for the bivariate plot.

col.biv

A logical variable indicating whether you want color to be used in the filled.contour plot. By default col.biv = FALSE.

...

Further arguments for plot.

Value

No value is returned.

Author(s)

Luis Meira-Machado, Javier Roca-Pardinas and Artur Araújo

References

Meira-Machado L., Roca-Pardinas J. (2011). p3state.msm: Analyzing Survival Data from an Illness-Death Model. Journal of Statistical Software, 38(3), 1-18. doi:10.18637/jss.v038.i03

See Also

p3state

Examples

data(heart2)
res.p3state<-p3state(heart2)

##Only transition probabilities
plot(res.p3state,plot.trans="all",time1=20,time2=100)

##Example of three-state model. All plots.
p<-which((heart2$delta==0 & heart2$status==0) | heart2$delta==1)
inputdata<-heart2[p,]
res2.p3state<-p3state(inputdata)
plot(res2.p3state,plot.trans="all",time1=20,
time2=200,plot.bivariate=TRUE,plot.marginal=TRUE)

[Package p3state.msm version 1.3.2 Index]