Description Usage Format Source References Examples
Followup of 312 randomised and 108 unrandomised patients with primary biliary cirrhosis, a rare autoimmune liver disease, at Mayo Clinic.
1 |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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")
|
Loading required package: ellipse
Attaching package: 'ellipse'
The following object is masked from 'package:graphics':
pairs
Attaching package: 'survival'
The following object is masked _by_ '.GlobalEnv':
pbc
The following objects are masked from 'package:SMPracticals':
aml, pbc
Call:
coxph(formula = Surv(time, status) ~ age + alb + alkphos + ascites +
bili + edtrt + hepmeg + platelet + protime + sex + spiders,
data = pbcm)
n= 312, number of events= 125
coef exp(coef) se(coef) z Pr(>|z|)
age 2.813e-02 1.029e+00 9.538e-03 2.950 0.00318 **
alb -9.718e-01 3.784e-01 2.681e-01 -3.624 0.00029 ***
alkphos 1.452e-05 1.000e+00 3.544e-05 0.410 0.68199
ascites 2.853e-01 1.330e+00 3.093e-01 0.923 0.35627
bili 1.059e-01 1.112e+00 1.666e-02 6.354 2.1e-10 ***
edtrt 6.921e-01 1.998e+00 3.224e-01 2.147 0.03183 *
hepmeg 4.853e-01 1.625e+00 2.193e-01 2.213 0.02688 *
platelet -6.059e-04 9.994e-01 1.025e-03 -0.591 0.55442
protime 2.426e-01 1.275e+00 8.422e-02 2.881 0.00397 **
sex -4.759e-01 6.213e-01 2.644e-01 -1.800 0.07182 .
spiders 2.892e-01 1.335e+00 2.092e-01 1.382 0.16696
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
exp(coef) exp(-coef) lower .95 upper .95
age 1.0285 0.9723 1.0095 1.048
alb 0.3784 2.6426 0.2237 0.640
alkphos 1.0000 1.0000 0.9999 1.000
ascites 1.3302 0.7518 0.7255 2.439
bili 1.1117 0.8995 1.0760 1.149
edtrt 1.9978 0.5005 1.0620 3.758
hepmeg 1.6247 0.6155 1.0571 2.497
platelet 0.9994 1.0006 0.9974 1.001
protime 1.2746 0.7846 1.0806 1.503
sex 0.6213 1.6095 0.3701 1.043
spiders 1.3353 0.7489 0.8861 2.012
Concordance= 0.842 (se = 0.029 )
Rsquare= 0.436 (max possible= 0.983 )
Likelihood ratio test= 178.9 on 11 df, p=<2e-16
Wald test = 194.3 on 11 df, p=<2e-16
Score (logrank) test = 315 on 11 df, p=<2e-16
Start: AIC=1122.98
Surv(time, status) ~ age + alb + alkphos + ascites + bili + edtrt +
hepmeg + platelet + protime + sex + spiders
Df AIC
- alkphos 1 1121.1
- platelet 1 1121.3
- ascites 1 1121.8
- spiders 1 1122.9
<none> 1123.0
- sex 1 1124.0
- edtrt 1 1125.4
- hepmeg 1 1126.1
- protime 1 1128.1
- age 1 1129.6
- alb 1 1133.8
- bili 1 1153.1
Step: AIC=1121.14
Surv(time, status) ~ age + alb + ascites + bili + edtrt + hepmeg +
platelet + protime + sex + spiders
Df AIC
- platelet 1 1119.4
- ascites 1 1119.9
- spiders 1 1120.9
<none> 1121.1
- sex 1 1122.2
- edtrt 1 1123.7
- hepmeg 1 1124.4
- protime 1 1126.3
- age 1 1127.7
- alb 1 1132.8
- bili 1 1151.7
Step: AIC=1119.42
Surv(time, status) ~ age + alb + ascites + bili + edtrt + hepmeg +
protime + sex + spiders
Df AIC
- ascites 1 1118.2
- spiders 1 1119.3
<none> 1119.4
- sex 1 1120.9
- edtrt 1 1122.8
- hepmeg 1 1123.1
- protime 1 1124.8
- age 1 1126.2
- alb 1 1131.1
- bili 1 1149.8
Step: AIC=1118.2
Surv(time, status) ~ age + alb + bili + edtrt + hepmeg + protime +
sex + spiders
Df AIC
<none> 1118.2
- spiders 1 1118.2
- sex 1 1120.5
- hepmeg 1 1121.8
- edtrt 1 1122.3
- protime 1 1124.2
- age 1 1126.0
- alb 1 1135.4
- bili 1 1151.1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.