pbc | R Documentation |
Followup of 312 randomised and 108 unrandomised patients with primary biliary cirrhosis, a rare autoimmune liver disease, at Mayo Clinic.
data(pbc)
A data frame with 418 observations on the following 20 variables.
in years
serum albumin
alkaline phosphotase
presence of ascites
serum bilirubin
serum cholesterol
presence of edema
0 no edema, 0.5 untreated or successfully treated 1 unsuccessfully treated edema
enlarged liver
survival time
platelet count
standardised blood clotting time
1=male
liver enzyme (now called AST)
blood vessel malformations in the skin
histologic stage of disease (needs biopsy)
censoring status
1/2/-9 for control, treatment, not randomised
triglycerides
urine copper
Fleming, T. R. and Harrington, D. P. (1991) Counting Processes and Survival Analysis. Wiley: New York.
Davison, A. C. (2003) Statistical Models. Cambridge University Press. Page 549.
data(pbc)
# to make version of dataset used in book
pbcm <- pbc[(pbc$trt!=-9),]
pbcm$copper[(pbcm$copper==-9)] <- median(pbcm$copper[(pbcm$copper!=-9)])
pbcm$platelet[(pbcm$platelet==-9)] <- median(pbcm$platelet[(pbcm$platelet!=-9)])
attach(pbcm)
library(survival)
par(mfrow=c(1,2),pty="s")
plot(survfit(Surv(time,status)~trt),ylim=c(0,1),lty=c(1,2),
ylab="Survival probability",xlab="Time (days)")
plot(survfit(coxph(Surv(time,status)~trt+strata(sex))),ylim=c(0,1),lty=c(1,2),
ylab="Survival probability",xlab="Time (days)")
lines(survfit(coxph(Surv(time,status)~trt)),lwd=2)
# proportional hazards model fit
fit <- coxph(formula = Surv(time, status) ~ age + alb + alkphos + ascites +
bili + edtrt + hepmeg + platelet + protime + sex + spiders, data=pbcm)
summary(fit)
step.fit <- step(fit,direction="backward")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.