plot.p3state: Plot Method for an p3state object

Description Usage Arguments Author(s) See Also Examples

Description

Plot method for an object of class 'p3state'. It 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

1
2
3
## 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 for the transition probabilities, bivariate distribution function. NULL is equivalent to 0.

time2

The second time for obtaining estimates for 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

Author(s)

Luis Meira-Machado and Javier Roca-Pardinas

See Also

p3state

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

p3state.msm documentation built on May 2, 2019, 2:29 p.m.