plot.idm {SmoothHazard} | R Documentation |
Plot method for an illness-death model
Description
Plot estimated baseline transition intensities from an object of class
idm
optionally with confidence limits.
Usage
## 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 |
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 |
transition |
Choose one of the transition intensities: |
... |
Passed to |
Value
Print a plot of the baseline transition intensities of an illness-death model estimated using a Weibull approach.
See Also
Examples
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)
## 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)
[Package SmoothHazard version 2024.04.10 Index]