plot.survIDM: Plot for an object of class "survIDM".

Description Usage Arguments Value Author(s) Examples

View source: R/plot.survIDM.R

Description

It draws the estimated probabilities.

Usage

1
2
3
4
5
## S3 method for class 'survIDM'
plot(x = object, y = NULL, trans = "all",
func = "distribution", conf = NULL,
type = NULL, conftype = NULL, col = 1:6, confcol = 1:6, lty = 1, conflty = 2,
xlab = "Time (years)", ylab = NULL, ylim = NULL, xlim = NULL, ...)

Arguments

x

An object of class "survIDM".

y

NULL

trans

The transition probabilities plotted. It is used only when the object is of class "AJ", "LIDA" "LM", "PLM", "LMAJ", "PLMAJ", "PAJ" and "tpIPCW". Possible options are "all" (default), "00", "01", "02", "11" or "12".

func

It is used only when the object is of class "soj" or "sojIPCW". The type of curve to be drawn ("distribution" or "survival"). Default to "distribution".

conf

Draw the confidence intervals into the plot. By default it is NULL, they are drawn if the "surv" object contains them.

type

The type of plot that should be drawn. See details par for possible options. Defaults to "s" for the draw be stair steps.

conftype

The type of plot that should be drawn for confidence intervals. See details par for possible options. Defaults to "s" for the draw be stair steps.

col

Vector of colors. Colors are used cyclically.

confcol

Vector of colors for the confidence intervals. Colors are used cyclically.

lty

The line type. Line types can either be specified as an integer (0 = blank, 1 = solid (default), 2 = dashed, 3 = dotted, 4 = dotdash, 5 = longdash, 6 = twodash). See details in par.

conflty

The line type for confidence intervals. Line types can either be specified as an integer (0 = blank, 1 = solid (default), 2 = dashed, 3 = dotted, 4 = dotdash, 5 = longdash, 6 = twodash).

xlab

A title for the x axis: see title.

ylab

A title for the y axis: see title.

ylim

The y limits of the plot.

xlim

The x limits of the plot.

...

Other options.

Value

No value is returned.

Author(s)

Luis Meira-Machado, Marta Sestelo and Gustavo Soutinho.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
res <- tprob(survIDM(time1, event1, Stime, event) ~ 1, s = 0,
method = "AJ", conf = FALSE, data = colonIDM)

plot(res)
plot(res, trans = "02")


res1 <- tprob(survIDM(time1, event1, Stime, event) ~ factor(sex), s = 365,
method = "AJ", conf = FALSE, data = colonIDM)

plot(res1, trans="02", ylim=c(0,0.5))


res2 <- CIF(survIDM(time1, event1, Stime, event) ~ age, data = colonIDM,
z.value = 56, conf = FALSE)

plot(res2)


res3 <- sojourn(survIDM(time1, event1, Stime, event) ~ factor(sex),
data = colonIDM, conf = FALSE, conf.level = 0.95)

plot(res3)

survidm documentation built on May 2, 2019, 2:14 p.m.