Description Usage Arguments Details Value Author(s) References See Also Examples
This function aim at estimating timedependent Sensitivity (Se), Specificity (Sp), Positive Predictive Value (PPV) and Negative Predictive Value (NPV) at a given cutpoint. Standard error computation via iidrepresentation of the estimator is also implemented.
1 2  SeSpPPVNPV(cutpoint, T, delta, marker, other_markers = NULL, cause,
weighting = "marginal", times, iid = FALSE)

cutpoint 
The cutpoint for maker value at which we aim at estimating Se, Sp, PPV and NPV. 
T 
The vector of (censored) eventtimes. 
delta 
The vector of event indicators at the corresponding value of the vector

marker 
The vector of the marker values for which we want to compute the timedependent ROC curves. Without loss of generality, the function assumes that larger values of the marker are associated with higher risks of events. If lower values of the marker are associated with higher risks of events, then reverse the association adding a minus to the marker values. 
other_markers 
A matrix that contains values of other markers that we want to take into
account for computing the inverse probability of censoring
weights. The different columns
represent the different markers. This argument is optional, and
ignored if 
cause 
The value of the event indicator that represents the event of interest
for which we aim to compute the timedependent ROC curve. Without
competing risks, it must be the value that indicates a noncensored
obsevation (usually 
weighting 
The method used to compute the weights. 
times 
The vector of times points "t" at which we want to compute the
timedependent ROC curve. If vector 
iid 
A logical value that indicates if we want to compute the
iidrepresentation of the area under timedependent ROC curve
estimator. 
This function computes Inverse Probability of Censoring Weighting (IPCW) estimates of Sensitivity (Se), Specificity (Sp), Positive Predictive Value (PPV) and Negative Predictive Value (NPV) for Cumulative/Dynamic definition of cases and controls.
Let T_i denote the event time of the subject i.
Without competing risks : A case is defined as a subject i with T_i <=t. A control is defined as a subject i with T_i > t.
With competing risks : In this setting, subjects may undergo different type of events, denoted by δ_i in the following. Let suppose that we are interested in the event δ_i=1. Then, a case is defined as a subject i with T_i <=t and δ_i = 1.
With competing risks, two definitions of controls were suggested: (i) a control is defined as a subject i that is free of any event, i.e with T_i > t, and (ii) a control is defined as a subject i that is not a case, i.e with T_i > t or with T_i <=t and δ_i != 1 .
For all outputs of this package, objects named with _1
refer to definition (i). For instance AUC_1
or se_1
refer to timedependent area under the ROC curve and its estimated standard error according to the definition (i). Objects named with _2
refer to definition (ii) .
Object of class "ipcwsurvivalSeSpPPVNPV" or "ipcwcompetingrisksSeSpPPVNPV", depending on if there is competing risk or not, that is a list. For these classes, there are print, plot and confint methods. Most objects that they contain are similar, but some are specific to each class.
Specific objects of class "ipcwsurvivalSeSpPPVNPV" :
TP
: vector of timedependent True Positive fraction
(sensitivity) estimates at each time points.
FP
: vector of timedependent False Positive fraction
(1specificity) estimates at each time points.
PPV
: vector of timedependent Positive Predictive Value
estimates at each time points.
NPV
: vector of timedependent Negative Predictive Value
estimates at each time points.
Specific objects of class "ipcwcompetingrisksSeSpPPVNPV" :
TP
: vector of timedependent True Positive fraction
(sensitivity) estimates at each time points.
FP_1
: vector of timedependent False Positive fraction
(1specificity) estimates at each time points with definition
(i) of controls (see Details).
FP_2
: vector of timedependent False Positive fraction
(1specificity) estimates at each time points with definition
(ii) of controls (see Details).
PPV_1
: vector of timedependent Positive Predictive Value
estimates at each time points with definition
(i) of controls (see Details).
NPV_2
: vector of timedependent Negative Predictive Value
estimates at each time points with definition
(ii) of controls (see Details).
Objects common to both classes :
times
: the time points for which Se, Sp,
PPV, etc.. were computed.
cutpoint
: the cutpoint for which Se, Sp,
PPV, etc.. were computed.
weights
: a object of class "IPCW", containing all informations about the weights. See ipcw
function of pec
package.
computation_time
: the total computation time.
Stats
: a matrix containing descriptive statistics at each time points (like numbers of observed cases or censored observations before each time points).
iid
: the logical value of parameter iid
used in argument.
n
: the sample size, after having omitted missing vaues.
inference
: a list that contains, among other things, iidrepresentations and estimated standard errors of the estimators.
computation_time
: the computation time, in seconds.
Paul Blanche [email protected]
Blanche, P., Dartigues, J. F., & JacqminGadda, H. (2013). Estimating and comparing timedependent areas under receiver operating characteristic curves for censored event times with competing risks. Statistics in medicine, 32(30), 53815397.
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 27 28 29 30 31 32 33 34 35 36 37  ##Without competing risks
library(survival)
data(pbc)
head(pbc)
pbc<pbc[!is.na(pbc$trt),] # select only randomised subjects
pbc$status<as.numeric(pbc$status==2) # create event indicator: 1 for death, 0 for censored
# Se, Sp, PPV and NPV computation for serum bilirunbin at threshold c=0.9(mg/dl)
res.SeSpPPVNPV.bili < SeSpPPVNPV(cutpoint=0.9,
T=pbc$time,
delta=pbc$status,marker=pbc$bili,
cause=1,weighting="marginal",
times=quantile(pbc$time,probs=seq(0.2,0.8,0.1)),
iid=TRUE)
res.SeSpPPVNPV.bili
##With competing risks
#Example with Paquid data
data(Paquid)
# Se, Sp, PPV and NPV computation for DSST at threshold c=22
res.SeSpPPVNPV.DSST < SeSpPPVNPV(cutpoint=22,
T=Paquid$time,
delta=Paquid$status,marker=Paquid$DSST,
cause=1,weighting="cox",
times=c(3,5,8,10))
res.SeSpPPVNPV.DSST
#Example with Melano data
data(Melano)
# Se, Sp, PPV and NPV computation for tumor thickness at threshold c=3 (1/100 mm)
res.SeSpPPVNPV.thick < SeSpPPVNPV(cutpoint=3,
T=Melano$time,delta=Melano$status,
weighting="marginal",
marker=Melano$thick,cause=1,
times=c(1800,2000,2200),
iid=TRUE)
res.SeSpPPVNPV.thick

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.