Description Usage Format Source Examples
Pneumonia status on admission for intensive care unit (ICU) patients, a random sample from the SIR-3 study.
1 |
The data contains 747 rows and 4 variables:
Randomly generated patient id
Pneumonia indicator. 0: No pneumonia, 1: Pneumonia
Status indicator. 0: censored observation, 1: discharged, 2: dead
Follow-up time in day
Age at inclusion
Sex. F
for female and M
for male
Beyersmann, J., Gastmeier, P., Grundmann, H., Baerwolff, S., Geffers, C., Behnke, M., Rueden, H., and Schumacher, M. Use of multistate models to assess prolongation of intensive care unit stay due to nosocomial infection. Infection Control and Hospital Epidemiology, 27:493-499, 2006.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # data set transformation
data(sir.adm)
id <- sir.adm$id
from <- sir.adm$pneu
to <- ifelse(sir.adm$status==0,"cens",sir.adm$status+1)
times <- sir.adm$time
dat.sir <- data.frame(id,from,to,time=times)
# Possible transitions
tra <- matrix(ncol=4,nrow=4,FALSE)
tra[1:2,3:4] <- TRUE
na.pneu <- mvna(dat.sir,c("0","1","2","3"),
tra,"cens")
if(require("lattice")) {
xyplot(na.pneu,tr.choice=c("0 2","1 2","0 3","1 3"),
aspect=1,strip=strip.custom(bg="white",
factor.levels=c("No pneumonia on admission -- Discharge",
"Pneumonia on admission -- Discharge",
"No pneumonia on admission -- Death",
"Pneumonia on admission -- Death"),
par.strip.text=list(cex=0.9)),
scales=list(alternating=1),xlab="Days",
ylab="Nelson-Aalen esimates")
}
|
Loading required package: lattice
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.