plot.idm: Plot method for an illness-death model

Description Usage Arguments Value See Also Examples

View source: R/plot.idm.R

Description

Plot estimated baseline transition intensities from an object of class idm optionally with confidence limits.

Usage

1
2
3
4
## S3 method for class 'idm'
plot(x, conf.int = FALSE, citype = "shadow", add = FALSE,
  axes = TRUE, col, lwd, lty, xlim, ylim, xlab, ylab, legend = TRUE,
  transition = c("01", "02", "12"), ...)

Arguments

x

a idmWeib class object (output from calling idm with the (default) option intensities="Weib".

conf.int

If TRUE show confidence limits

citype

Type of confidence limits, can be "shadow" or "bars"

add

If TRUE add to existing plot

axes

If TRUE axes are drawn

col

Color of the lines

lwd

Width of the lines

lty

Type of the lines

xlim

Limits for x-axis

ylim

Limits for y-axis

xlab

Label for x-axis

ylab

Label for y-axis

legend

If TRUE a legend is drawn, which can be further controlled via SmartControl.

transition

Choose one of the transition intensities: c("01","02","12").

...

Passed to SmartControl

Value

Print a plot of the baseline transition intensities of an illness-death model estimated using a Weibull approach.

See Also

print.idm,summary.idm,idm,

idm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(lava)
library(prodlim)
m <- idmModel(scale.lifetime=1/10,scale.illtime=1/8)
distribution(m,"X") <- binomial.lvm()
regression(m,latent.lifetime~X) <- 0.7
set.seed(30)
d <- sim(m,100)
fit.weib <- idm(formula02=Hist(observed.lifetime,event=seen.exit)~1,
formula01=Hist(time=list(L,R),event=seen.ill)~1,data=d,conf.int=FALSE)
plot(fit.weib)

## Not run: 
## FIXME: the limits for the 01 transition are a bit wide!?
## with bootstrap confidence limits
fit.weib <- idm(formula02=Hist(observed.lifetime,event=seen.exit)~1,
formula01=Hist(time=list(L,R),event=seen.ill)~1,data=d,conf.int=TRUE)
plot(fit.weib)

## End(Not run)

Example output

Loading required package: prodlim

SmoothHazard documentation built on May 2, 2019, 4:43 p.m.