# AUC: Calculate AUC(t) curve In dynpred: Companion Package to "Dynamic Prediction in Clinical Survival Analysis"

## Description

Calculate model-free curve of Area Under the Curve values over time, based on the dynamic/incident AUC of Heagerty and Zheng.

## Usage

 `1` ```AUC(formula, data, plot = TRUE) ```

## Arguments

 `formula` Formula for prediction model to be used as in `coxph` `data` Data set in which to interpret the formula `plot` Determines whether the AUC function should be plotted (if `TRUE` (default)) along with a `lowess` curve or not (if `FALSE`)

## Value

A list with elements

 `AUCt` A data frame with time t in column `time` and AUC(t) in column `AUC` `AUC` The AUC(t) weighted by Y(t)-1, with Y(t) the number at risk at t; this coincides with Harrell's c-index

## Author(s)

Hein Putter [email protected]

## References

Harrell FE, Lee KL & Mark DB (1996), Multivariable prognostic models: issues in developing models, evaluating assumptions and adequacy, and measuring and reducing errors, Statistics in Medicine 15, 361-387.

Heagerty PJ & Zheng Y (2005), Survival model predictive accuracy and ROC curves, Biometrics 61, 92-105.

van Houwelingen HC, Putter H (2012). Dynamic Prediction in Clinical Survival Analysis. Chapman & Hall.

## Examples

 ```1 2``` ```data(ova) AUC(Surv(tyears, d) ~ Karn + Broders + FIGO + Ascites + Diam, data = ova) ```

### Example output

```Loading required package: survival
\$AUCt
time        AUC
1   0.02465656 0.99439776
2   0.02465724 0.90168539
3   0.02465731 0.85915493
4   0.02739762 0.99858757
5   0.03561696 0.94475921
6   0.04109387 0.30113636
7   0.04109684 0.97863248
8   0.08219248 0.77142857
9   0.08767131 0.95128940
10  0.11232937 0.94827586
11  0.12328726 0.77809798
12  0.12876654 0.60404624
13  0.13150880 0.61594203
14  0.18082221 0.92732558
15  0.18904309 0.87609329
16  0.20000095 0.78947368
17  0.20821886 0.86070381
18  0.22465690 0.91764706
19  0.22739782 0.80530973
20  0.23835538 0.98520710
21  0.24657466 0.94807122
22  0.26575409 0.78273810
23  0.26575480 0.58059701
24  0.26849283 0.59880240
25  0.28493007 1.00000000
26  0.30684943 0.37198795
27  0.30684997 0.47734139
28  0.31232879 0.85757576
29  0.35616441 0.77811550
30  0.36438403 0.55657492
31  0.36712414 0.47085890
32  0.37260313 0.80923077
33  0.37808433 0.62037037
34  0.38630286 0.99071207
35  0.39999981 0.26708075
36  0.40000226 0.52959502
37  0.41917974 0.75781250
38  0.44109518 0.97492163
39  0.45753364 0.73113208
40  0.47945292 0.91009464
41  0.50137037 0.68196203
42  0.50137066 0.71428571
43  0.50959059 0.13216561
44  0.51233045 0.92492013
45  0.51506886 0.81891026
46  0.52328670 0.76527331
47  0.52328814 0.98064516
48  0.52602734 0.03721683
49  0.53698666 0.82629870
50  0.54246531 0.83224756
51  0.55068681 0.37418301
52  0.56438502 0.34918033
53  0.57260391 0.94736842
54  0.59999893 0.43564356
55  0.60547866 0.23344371
56  0.61643724 0.33887043
57  0.61643878 0.20666667
58  0.61917852 0.19732441
59  0.62191925 0.39765101
60  0.64657641 0.91582492
61  0.64931382 0.55743243
62  0.65205567 0.39152542
63  0.66575332 0.63265306
64  0.68219222 0.97781570
65  0.68219291 0.69178082
66  0.70410700 0.07560137
67  0.72602610 0.31034483
68  0.72602816 0.99307958
69  0.73424635 0.97222222
70  0.73424802 0.56271777
71  0.74246432 0.51748252
72  0.75068561 0.82807018
73  0.75342352 0.70774648
74  0.77808274 0.65724382
75  0.80822089 0.84219858
76  0.84383554 0.37366548
77  0.84931274 0.13928571
78  0.85205491 0.71326165
79  0.86301307 0.99280576
80  0.88219055 0.79422383
81  0.89589079 0.71195652
82  0.90958928 0.98909091
83  0.91506750 0.48905109
84  0.94246708 0.68864469
85  0.94520489 0.69301471
86  0.96438372 0.43726937
87  0.96712374 0.91111111
88  0.97534167 0.78252788
89  1.01095930 0.78358209
90  1.01369706 0.86142322
91  1.02191881 0.86090226
92  1.02739863 0.73396226
93  1.02739924 0.30303030
94  1.05479398 0.44486692
95  1.05753324 0.86450382
96  1.07671122 0.33333333
97  1.08767011 0.54038462
98  1.09315109 0.96911197
99  1.10410967 0.27131783
100 1.12876687 0.47470817
101 1.14246657 0.56835938
102 1.14794584 0.73333333
103 1.15342518 0.75984252
104 1.16712407 0.27865613
105 1.16986219 0.35714286
106 1.18356042 0.23306773
107 1.18904188 0.99800000
108 1.19452244 0.80321285
109 1.21369843 0.87096774
110 1.22191715 0.79554656
111 1.23561561 0.41463415
112 1.24657607 0.89795918
113 1.24931339 0.75000000
114 1.25479422 0.26748971
115 1.25753587 1.00000000
116 1.26301376 0.38174274
117 1.27123169 0.19583333
118 1.27123414 0.73012552
119 1.27397280 0.77100840
120 1.27671389 0.19620253
121 1.29041074 1.00000000
122 1.29862983 0.92340426
123 1.32054850 0.56410256
124 1.33150871 0.78540773
125 1.35342510 0.48922414
126 1.35616352 0.88744589
127 1.36438474 0.37173913
128 1.36438485 0.20087336
129 1.36712091 0.64473684
130 1.37534193 0.49559471
131 1.39452054 0.40486726
132 1.39726135 0.70888889
133 1.41643813 0.82366071
134 1.41917711 0.61659193
135 1.45205628 0.53153153
136 1.46027372 0.71040724
137 1.46301272 0.47045455
138 1.47397437 0.89041096
139 1.47671095 0.76605505
140 1.47945194 0.88479263
141 1.49041064 0.33796296
142 1.50136859 0.95813953
143 1.52876816 0.69859813
144 1.55342449 0.43661972
145 1.56712223 0.92688679
146 1.59178288 0.55924171
147 1.61095975 0.12619048
148 1.61643784 0.39234450
149 1.62739512 0.79326923
150 1.63561781 0.61835749
151 1.69314970 0.95388350
152 1.69588949 0.51219512
153 1.70137072 0.94362745
154 1.72328677 0.52709360
155 1.72602701 0.99504950
156 1.73972685 0.87562189
157 1.75616392 0.76000000
158 1.77808304 0.52010050
159 1.80821887 0.81060606
160 1.81643803 0.82233503
161 1.83013638 0.81122449
162 1.85753370 0.09230769
163 1.87123361 0.79896907
164 1.88218972 0.94300518
165 1.89315225 0.77604167
166 1.90685106 0.41099476
167 1.91232914 0.98421053
168 1.94246444 0.68518519
169 1.95890279 0.46276596
170 1.95890431 0.78342246
171 1.97260223 0.92473118
172 1.98082162 0.97567568
173 1.98356120 0.67934783
174 1.98904050 0.72131148
175 1.98904067 0.82967033
176 1.99999927 0.07458564
177 2.00821842 0.14722222
178 2.01369739 0.92737430
179 2.01369783 0.96629213
180 2.01643777 0.20621469
181 2.02739694 0.72443182
182 2.10684877 0.77428571
183 2.12054783 0.95402299
184 2.13424599 0.92485549
185 2.14520258 0.78488372
186 2.15616310 0.89181287
187 2.16164402 0.82941176
188 2.17534330 0.98224852
189 2.17808262 0.48511905
190 2.18082183 0.84431138
191 2.18356035 0.38855422
192 2.20547824 0.49696970
193 2.26027473 0.88414634
194 2.27123421 0.90184049
195 2.27397113 0.98148148
196 2.30137153 0.75155280
197 2.31506909 0.86875000
198 2.32054736 0.27044025
199 2.35616393 0.98101266
200 2.38629944 0.68789809
201 2.43013745 0.37179487
202 2.52054852 0.70322581
203 2.52328935 0.07142857
204 2.52602886 0.93137255
205 2.56712272 0.28289474
206 2.57260117 0.94701987
207 2.58629930 0.57333333
208 2.61917785 0.70805369
209 2.63013806 0.83783784
210 2.63835593 0.93877551
211 2.66575332 0.50000000
212 2.68492981 0.73448276
213 2.72054835 0.45138889
214 2.74794625 0.93006993
215 2.76438334 0.20422535
216 2.81917917 0.87234043
217 2.83835499 0.57500000
218 2.83835614 0.48920863
219 2.88219159 0.26086957
220 2.91780672 0.35766423
221 2.98082243 0.27941176
222 3.01095995 0.89259259
223 3.03287650 0.89552239
224 3.03835642 0.90977444
225 3.09863017 0.85984848
226 3.11781061 0.77099237
227 3.18082213 0.38076923
228 3.25479496 0.46124031
229 3.28219095 0.10937500
230 3.29041114 0.18897638
231 3.29863045 0.69841270
232 3.30136984 0.63600000
233 3.32876815 0.83064516
234 3.33424665 0.34146341
235 3.42191676 1.00000000
236 3.69588973 0.25206612
237 3.72602962 0.55000000
238 3.73972663 0.34033613
239 3.74520562 0.83050847
240 3.75342264 0.58119658
241 3.79726039 0.59051724
242 3.81369850 0.40000000
243 3.89315013 0.61403509
244 3.94246576 1.00000000
245 4.00000016 0.23660714
246 4.07397293 0.36036036
247 4.10958748 0.89090909
248 4.21369831 0.86666667
249 4.27397245 0.27272727
250 4.36986315 0.07065217
251 4.72054856 0.72435897
252 4.73698619 0.59210526
253 4.77808201 0.50684932
254 5.00821909 0.86567164
255 5.08766945 0.67187500
256 5.10410752 0.12903226
257 5.14246594 0.00000000
258 5.16164409 0.82142857
259 5.25753440 0.31132075
260 5.29589206 0.71428571
261 5.32876637 0.52127660
262 5.47671319 1.00000000
263 5.66849293 0.82857143
264 5.73150723 0.69696970
265 5.86849255 0.10000000

\$AUC
[1] 0.6650965
```

dynpred documentation built on May 2, 2019, 5:07 a.m.