plot.TPidm: Plot method for a TPidm object

Description Usage Arguments Examples

View source: R/plot.TPidm.R

Description

Plot method for an object of class ‘TPidm’. It draws the estimated occupation probabilities (if s = 0) or transition probabilities (if s > 0) and confidence intervals (only available if CI is TRUE) in a basic scatterplot or in a multipanel layout.

Usage

1
2
## S3 method for class 'TPidm'
plot(x, chosen.tr = "ALL", col = "black", ...)

Arguments

x

An object of class ‘TPidm’.

chosen.tr

Character vector of the form ‘c(“from to”, “from to”)’ specifying which transitions should be plotted. Default, all the transition probabilities are plotted.

col

Character vector specifying colors for each curves. Default col=“black”.

...

Further arguments to plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data(colonTP)

# create a TPidm object with s = 0, t = "last" (default),
# CI = FALSE and method = "NM" (default):
nm0 <- TPidm(colonTP, s = 0, CI=FALSE)

# plot all possible transitions without CI:
plot(nm0)

# or 
# create a TPidm object with s = 0, t = "last" (default),
# CI = TRUE (default) and method = "AJ":
aj0ci <- TPidm(colonTP, s = 0, method = "AJ")

# plot transitions "1 2" and "1 3" with CI:
plot(aj0ci, chosen.tr = c("1 2", "1 3"))

# create a TPidm object with s = 365, t = 1095, cov = "rx",
# CI = FALSE and method = "NM" (default):
nm365cov <- TPidm(colonTP, s = 365, t = 1095, cov = "rx", CI=FALSE)

# plot transitions "1 2" and "1 3" without CI:
plot(nm365cov, chosen.tr = c("1 2", "1 3"), col=c("blue","red","green"))

TP.idm documentation built on April 19, 2018, 1:04 a.m.