Description Usage Arguments Details Value Author(s) References Examples
Calculate dynamic fixed width prediction error curve.
1 2 3 4 5 |
time |
Vector of time points in data |
status |
Vector of event indicators in data |
tsurv |
Vector of time points corresponding to the estimated survival
probabilities in |
survmat |
Matrix of estimated survival probabilities; dimension should be length of tsurv x length of time |
tcens |
Vector of time points corresponding to the estimated censoring
probabilities in |
censmat |
Matrix of estimated censoring probabilities; dimension should be length of tcens x length of time |
width |
Width of the window |
FUN |
The error function, either |
tout |
Vector of time points at which to evaluate prediction error. If missing, prediction error will be evaluated at all time points where the estimate will change value |
formula |
Formula for prediction model to be used as in
|
censformula |
Formula for censoring model, also to be used as in
|
data |
Data set in which to interpret |
censdata |
Data set in which to interpret |
CV |
Boolean (default= |
progress |
Boolean (default= |
Corresponds to Equation (3.6) in van Houwelingen and Putter (2011). The
censformula
is used to calculate inverse probability of censoring
weights (IPCW).
A data frame with columns
time |
Event time points |
Err |
Prediction error of model specified by |
and with attribute "width"
given as input.
Hein Putter H.Putter@lumc.nl
van Houwelingen HC, Putter H (2012). Dynamic Prediction in Clinical Survival Analysis. Chapman & Hall.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(ova)
# Example on a subset, because the effect of CV is clearer
ova2 <- ova[1:100,]
pewcox(Surv(tyears, d) ~ Karn + Broders + FIGO + Ascites + Diam, Surv(tyears, 1-d) ~ 1,
width=2, data = ova2, FUN="Brier", tout=seq(0,6,by=0.5))
pewcox(Surv(tyears, d) ~ Karn + Broders + FIGO + Ascites + Diam, Surv(tyears, 1-d) ~ 1,
width=2, data = ova2, FUN="Brier", tout=seq(0,6,by=0.5), CV=TRUE, progress=TRUE)
pewcox(Surv(tyears, d) ~ Karn + Broders + FIGO + Ascites + Diam, Surv(tyears, 1-d) ~ 1,
width=2, data = ova, FUN="Brier", tout=seq(0,6,by=0.5))
pewcox(Surv(tyears, d) ~ Karn + Broders + FIGO + Ascites + Diam, Surv(tyears, 1-d) ~ 1,
width=2, data = ova, FUN="Brier", tout=seq(0,6,by=0.5), CV=TRUE, progress=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.