Description Usage Arguments Details Author(s) See Also Examples
Printing of objects created with the timeROC function
1 2 3 4 5 6 7 8 | ## S3 method for class 'ipcwsurvivalROC'
print(x, No.lines=5,digits=2, ...)
## S3 method for class 'ipcwcompetingrisksROC'
print(x, No.lines=5,digits=2, ...)
## S3 method for class 'ipcwsurvivalSeSpPPVNPV'
print(x, No.lines=5,digits=2, ...)
## S3 method for class 'ipcwcompetingrisksSeSpPPVNPV'
print(x, No.lines=5,digits=2, ...)
|
x |
Object of class "ipcwsurvivalROC", "ipcwcompetingrisksROC", "ipcwsurvivalSeSpPPVNPV" or "ipcwcompetingrisksSeSpPPVNPV". |
No.lines |
The (maximum) number of lines printed. Each line corresponds to a time point included in the vector |
digits |
The number of significant digits. Default value is |
... |
Not used. |
The print function recalls the sample size (after having removed missing data), the AUC estimates, and the estimated standard errors (only if they have been estimated) for at maximum No.lines
time points. In addition, it displays the frequencies of :
observed cases: subjects for which we know they undergo the (main) event prior the time "t" of interest.
survivors : event-free subjects at time "t" of interest.
censored subjects : censored subjects prior the time "t" of interest, for which we cannot know if they undergo an event or not prior time "t" (and so for which we cannot know if they are cases or controls at time "t").
other events: (in the competing risks setting only) subjects for which we know that they undergo an event different from the main event prior the time "t" of interest.
Furthermore, the function recalls the method used to compute the inverse probability of censoring weights.
Paul Blanche pabl@sund.ku.dk
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | ##-------------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
ROC.bili.cox<-timeROC(T=pbc$time,
delta=pbc$status,marker=pbc$bili,
other_markers=as.matrix(pbc[,c("chol","albumin")]),
cause=1,weighting="cox",
times=quantile(pbc$time,probs=seq(0.2,0.8,0.01)))
# prints descriptive statistics and AUC estimates (5,10 and 20 lines)
print(ROC.bili.cox)
print(ROC.bili.cox,No.lines=10)
print(ROC.bili.cox,No.lines=20,digits=1)
# 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,
other_markers=as.matrix(pbc[,c("chol","albumin")]),
cause=1,weighting="cox",
times=quantile(pbc$time,probs=seq(0.2,0.8,0.1)))
# prints descriptive statistics and Se, Sp, PPV and NPV
# estimates for serum bilirunbin at threshold c=0.9(mg/dl)
print(res.SeSpPPVNPV.bili,No.lines=20,digits=1)
ROC.bili.marginal<-timeROC(T=pbc$time,
delta=pbc$status,marker=pbc$bili,
cause=1,weighting="marginal",
times=quantile(pbc$time,probs=seq(0.1,0.9,0.2)),
iid=TRUE)
# prints descriptive statistics, AUC estimates and also standard errors
# of AUCs because weighting="marginal" and iid=TRUE were used.
print(ROC.bili.marginal)
##-------------With competing risks-------------------
data(Melano)
ROC.thick<-timeROC(T=Melano$time,delta=Melano$status,
marker=Melano$thick,cause=1,
weighting="marginal",
times=c(1500,2000,2500),iid=TRUE)
# prints descriptive statistics, AUC estimates and also standard errors
# of AUCs because weighting="marginal" and iid=TRUE were used.
print(ROC.thick)
# 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)
print(res.SeSpPPVNPV.thick,digits=1)
|
id time status trt age sex ascites hepato spiders edema bili chol
1 1 400 2 1 58.76523 f 1 1 1 1.0 14.5 261
2 2 4500 0 1 56.44627 f 0 1 1 0.0 1.1 302
3 3 1012 2 1 70.07255 m 0 0 0 0.5 1.4 176
4 4 1925 2 1 54.74059 f 0 1 1 0.5 1.8 244
5 5 1504 1 2 38.10541 f 0 1 1 0.0 3.4 279
6 6 2503 2 2 66.25873 f 0 1 0 0.0 0.8 248
albumin copper alk.phos ast trig platelet protime stage
1 2.60 156 1718.0 137.95 172 190 12.2 4
2 4.14 54 7394.8 113.52 88 221 10.6 3
3 3.48 210 516.0 96.10 55 151 12.0 4
4 2.54 64 6121.8 60.63 92 183 10.3 4
5 3.53 143 671.0 113.15 72 136 10.9 3
6 3.98 50 944.0 93.00 63 NA 11.0 3
Time-dependent-Roc curve estimated using IPCW (n=284, without competing risks).
Cases Survivors Censored AUC (%)
t=999.2 48 226 10 83.90
t=1425.95 63 184 37 87.47
t=1839.5 76 139 69 87.57
t=2388.1 87 96 101 83.82
t=3039 98 57 129 80.11
Method used for estimating IPCW:cox
Total computation time : 1.26 secs.
Time-dependent-Roc curve estimated using IPCW (n=284, without competing risks).
Cases Survivors Censored AUC (%)
t=999.2 48 226 10 83.90
t=1233.88 58 208 18 85.34
t=1386.94 62 190 32 86.67
t=1548.4 68 170 46 87.51
t=1771.02 74 148 62 88.17
t=1964.28 78 130 76 86.92
t=2234.2 83 112 89 82.92
t=2459.7 89 90 105 83.41
t=2615.27 94 76 114 80.78
t=3039 98 57 129 80.11
Method used for estimating IPCW:cox
Total computation time : 1.26 secs.
Time-dependent-Roc curve estimated using IPCW (n=284, without competing risks).
Cases Survivors Censored AUC (%)
t=999.2 48 226 10 83.9
t=1118.45 52 219 13 84.5
t=1216 58 209 17 85.4
t=1297.57 60 201 23 86.0
t=1386.94 62 190 32 86.7
t=1434 64 180 40 87.8
t=1510.09 67 173 44 87.5
t=1614 69 163 52 87.1
t=1700.45 73 155 56 88.2
t=1785.28 74 145 65 88.0
t=1930.04 78 133 73 87.2
t=2056.3 79 123 82 85.5
t=2176.76 82 117 85 84.3
t=2267.36 84 109 91 83.6
t=2357.24 86 99 99 83.1
t=2459.7 89 90 105 83.4
t=2573.81 92 80 112 83.3
t=2658.26 94 74 116 81.0
t=2814.86 97 65 122 81.2
t=3039 98 57 129 80.1
Method used for estimating IPCW:cox
Total computation time : 1.26 secs.
Predictive accuracy measures at cutpoint c=0.9 estimated using IPCW (n=284, with competing risks).
No. of positive (X>c) =191, No. of negative (X<=c) =93.
Cases Survivors Censored Se (%) Sp (%) PPV (%) NPV (%)
t=999.2 48 226 10 95.9 39.7 24.7 97.9
t=1307.4 60 198 26 96.8 42.6 31.9 97.9
t=1548.4 68 170 46 97.2 46.3 38.0 98.0
t=1839.5 76 139 69 94.3 49.4 43.6 95.5
t=2234.2 83 112 89 90.1 48.5 46.6 90.7
t=2555.7 92 83 109 86.8 49.0 53.4 84.7
t=3039 98 57 129 86.5 51.4 59.6 82.2
Method used for estimating IPCW:cox
Total computation time : 1.11 secs.
Time-dependent-Roc curve estimated using IPCW (n=312, without competing risks).
Cases Survivors Censored AUC (%) se
t=675.1 31 280 1 81.93 3.73
t=1307.4 68 218 26 85.66 2.56
t=1839.5 86 156 70 88.03 2.25
t=2555.7 102 94 116 83.41 3.17
t=3665.9 120 32 160 81.57 3.85
Method used for estimating IPCW:marginal
Total computation time : 0.21 secs.
Time-dependent-Roc curve estimated using IPCW (n=205, with competing risks).
Cases Survivors Other events Censored AUC_1 (%) se_1 AUC_2 (%) se_2
t=1500 36 159 8 2 80.47 3.87 79.54 3.87
t=2000 46 103 10 46 75.22 4.18 74.04 4.14
t=2500 53 66 11 75 71.14 4.77 70.12 4.63
Method used for estimating IPCW:marginal
Total computation time : 0.52 secs.
Predictive accuracy measures at cutpoint c=3 estimated using IPCW (n=205, with competing risks).
No. of positive (X>c) =72,
No. of negative (X<=c) =133.
Cases Survivors Other events Censored Se se_Se Sp_1 se_Sp1 Sp_2
t=1800 45 124 9 27 66.2 7.1 71.0 4.1 70.1
t=2000 46 103 10 46 64.3 7.1 71.8 4.4 70.3
t=2200 50 83 11 61 59.6 7.1 71.1 5.0 69.9
se_Sp_2 PPV (%) se_PPV NPV_1 se_NPV_1 NPV_2 se_NPV_2
t=1800 4.0 38.9 5.7 83.8 3.3 87.8 3.0
t=2000 4.3 39.3 5.9 82.9 3.5 86.8 3.1
t=2200 4.8 41.1 6.2 77.9 4.1 83.1 3.7
Method used for estimating IPCW:marginal
Total computation time : 0.02 secs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.