PBC: Dynamic Risk Prediction
- Background Reading
- Data
- pbc-data-seq.txt --- Primary Billiary
Cirrhosis (PBC) sequential data with time-varying values
- pbcseq R documentation --- Note
that the pbc-data-seq.txt file has been modified for this tutorial
- Required R Packages
- survival -- survival analysis (Cox regression, Kaplan-Meier)
- survivalROC -- methods for cumulative/dynamic time-dependent ROC
- nlme -- linear and nonlinear mixed effects models
- JM -- joint modeling of longitudinal and survival data
- Required R Functions
- Exercises
- Data setup
[1] Input the data. Format the dataframe by creating the following variables:
- time = survival time
- status = event indicator (1 = event, 0 = censored)
- meas.time = marker measurement time
- sub.id = unique patient identifier
- ix.baseline.visit = indicator of baseline visit
- t.star = time - measurement time (derived survival time, setting each measurement time as baseline)
- marker = bilirubin (marker of interest)
- x1 and x2 = linear and quadratic terms for measurement time as fixed effect covariates
- z1 = linear term for measurement time as a random effect covariate
[2] Split the dataset into training and test sets.
- Longitudinal model for marker
[3] In the training set, use lme and obtain BLUP predictions for the marker.
[4] Plot raw bilirubin trajectories and BLUP predictions for first 10 subjects in training set.
- Survival model for mortality risk
[5] For s=1 and t=2, obtain conditional risk predictions using PC and test set.
[6] For s=1 and t=2, obtain conditional risk predictions using PC_BLUP and test set.
[7] For s=1 and t=2, obtain conditional risk predictions using JM and test set.
- Prediction accuracy
[8] In the test set, use survivalROC, estimate the AUCs associated
with PC, PC_BLUP and JM for s=1 and t=2.
- Example R Files
- Example Results