toleranceplot: Create a tolerance plot

Description Usage Arguments Details Value Author(s) References Examples

View source: R/toleranceplot.R

Description

Create a tolerance plot according to the methods of Henderson, Jones & Stare (2001)

Usage

1
toleranceplot(formula, data, coverage = 0.8, horizon, plot = TRUE, xlab)

Arguments

formula

Formula for prediction model to be used as in coxph

data

Data set in which to interpret the formula

coverage

The coverage for the tolerance intervals (default is 0.8)

horizon

The horizon, maximum value to be imputed in case of censored observations; default is 1.05 times largest event time

plot

Should the tolerance plot actually be plotted? Default is TRUE

xlab

Label for x-axis

Details

Warnings will be issued each time the survival curve corresponding to a value of x never goes below (1-coverage)/2; these warnings may be ignored.

Value

A data frame with columns

x

Predictor (centered at zero)

lower

Lower bound of tolerance interval

upper

Upper bound of tolerance interval

and with attributes "coverage" and "horizon" (copied from input or default).

Author(s)

Hein Putter H.Putter@lumc.nl

References

Henderson R, Jones M & Stare J (2001), Accuracy of point predictions in survival analysis, Statistics in Medicine 20, 3083-3096.

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

Examples

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

Example output

Loading required package: survival
               x     lower    upper
1   -1.617529760 1.6958895 6.161917
2   -1.370918028 1.3643847 6.161917
3   -1.345986990 1.3534251 6.161917
4   -1.294232175 1.2767139 6.161917
5   -1.197691593 1.2356156 6.161917
6   -1.172760555 1.2136984 6.161917
7   -1.121005740 1.1698622 6.161917
8   -1.099375258 1.1534252 6.161917
9   -1.097450658 1.1534252 6.161917
10  -1.088774309 1.1479458 6.161917
11  -1.047620443 1.1041097 6.161917
12  -1.044854673 1.0931511 6.161917
13  -1.024465158 1.0876701 6.161917
14  -1.022689405 1.0876701 6.161917
15  -0.952433535 1.0219188 6.161917
16  -0.926148823 1.0109593 6.161917
17  -0.924224223 1.0109593 6.161917
18  -0.871628238 0.9452049 6.161917
19  -0.850838925 0.9424671 6.161917
20  -0.832984837 0.9150675 6.161917
21  -0.825907888 0.9095893 6.161917
22  -0.798242940 0.8821906 6.161917
23  -0.790679544 0.8821906 6.161917
24  -0.781353647 0.8630131 6.161917
25  -0.773311903 0.8520549 6.161917
26  -0.720690188 0.8082209 6.161917
27  -0.701167573 0.7780827 6.161917
28  -0.677612490 0.7506856 6.161917
29  -0.659758402 0.7424643 6.161917
30  -0.652681453 0.7424643 6.161917
31  -0.629135950 0.7342464 6.161917
32  -0.625016505 0.7342464 6.161917
33  -0.608127212 0.7260282 6.161917
34  -0.592785074 0.7260261 6.161917
35  -0.588617619 0.7260261 6.161917
36  -0.579296155 0.7041070 6.161917
37  -0.561442067 0.6821929 6.161917
38  -0.526700170 0.6657533 6.161917
39  -0.509810877 0.6520557 6.161917
40  -0.507664330 0.6520557 6.161917
41  -0.472154624 0.6465764 6.161917
42  -0.458056062 0.6219192 6.161917
43  -0.449147418 0.6219192 6.161917
44  -0.429624803 0.6191785 6.161917
45  -0.422596191 0.6164388 6.161917
46  -0.419558639 0.6164388 6.161917
47  -0.406069720 0.6164388 6.161917
48  -0.402669346 0.6164372 6.161917
49  -0.388215632 0.6164372 6.161917
50  -0.357593180 0.5999989 6.161917
51  -0.353473735 0.5999989 6.161917
52  -0.347286294 0.5999989 6.161917
53  -0.342005887 0.5726039 6.161917
54  -0.336584442 0.5726039 6.161917
55  -0.336460817 0.5726039 6.161917
56  -0.312905735 0.5643850 6.161917
57  -0.282683080 0.5506868 6.161917
58  -0.278563635 0.5424653 6.161917
59  -0.275920983 0.5424653 6.161917
60  -0.272525041 0.5424653 6.161917
61  -0.261274544 0.5424653 6.161917
62  -0.260309750 0.5369867 6.161917
63  -0.259127998 0.5369867 6.161917
64  -0.253632598 0.5369867 6.161917
65  -0.252598195 0.5369867 6.161917
66  -0.238144482 0.5260273 6.161917
67  -0.232843285 0.5260273 6.161917
68  -0.214989197 0.5232881 6.161917
69  -0.208678559 0.5232881 6.161917
70  -0.206532013 0.5232881 6.161917
71  -0.186513292 0.5232867 6.161917
72  -0.184366745 0.5232867 6.161917
73  -0.174300581 0.5232867 6.161917
74  -0.160811663 0.5150689 6.161917
75  -0.142228225 0.5123305 6.161917
76  -0.139679300 0.5123305 6.161917
77  -0.131125807 0.5123305 6.161917
78  -0.108215678 0.5095906 6.161917
79  -0.096747829 0.5013707 6.161917
80  -0.088048109 0.5013707 6.161917
81  -0.079371761 0.5013707 6.161917
82  -0.075743524 0.5013707 6.161917
83  -0.064918047 0.5013704 6.161917
84  -0.059616850 0.5013704 6.161917
85  -0.055816678 0.5013704 6.161917
86  -0.054851884 0.5013704 6.161917
87  -0.053670131 0.5013704 6.161917
88  -0.041362965 0.4794529 6.161917
89  -0.030662926 0.4794529 6.161917
90  -0.023147539 0.4794529 6.161917
91  -0.013286857 0.4575336 6.161917
92  -0.003220693 0.4575336 6.161917
93   0.009868428 0.4410952 6.161917
94   0.010268226 0.4410952 6.161917
95   0.011233020 0.4410952 6.161917
96   0.012414772 0.4410952 6.161917
97   0.024097613 0.4410952 6.161917
98   0.033547135 0.4410952 6.161917
99   0.042100628 0.4191797 6.161917
100  0.054405213 0.4191797 6.161917
101  0.062864210 0.4191797 6.161917
102  0.065010757 0.4000023 6.161917
103  0.070531887 0.4000023 6.161917
104  0.085178326 0.4000023 6.161917
105  0.088785772 0.4000023 6.161917
106  0.097482911 0.3999998 6.161917
107  0.108308388 0.3999998 6.161917
108  0.117409757 0.3999998 6.161917
109  0.118374551 0.3999998 6.161917
110  0.131863470 0.3863029 6.161917
111  0.139920857 0.3863029 6.161917
112  0.140416963 0.3863029 6.161917
113  0.142563509 0.3863029 6.161917
114  0.145959451 0.3863029 6.161917
115  0.183094863 0.3780843 6.161917
116  0.183494660 0.3780843 6.161917
117  0.184459455 0.3726031 6.161917
118  0.185641207 0.3726031 6.161917
119  0.190646897 0.3726031 6.161917
120  0.201346936 0.3726031 6.161917
121  0.224988996 0.3671241 6.161917
122  0.236090645 0.3671241 6.161917
123  0.239005001 0.3671241 6.161917
124  0.243242881 0.3671241 6.161917
125  0.244424634 0.3671241 6.161917
126  0.247558494 0.3671241 6.161917
127  0.265408149 0.3643840 6.161917
128  0.274109721 0.3643840 6.161917
129  0.281534822 0.3643840 6.161917
130  0.305089905 0.3561644 6.161917
131  0.311000745 0.3561644 6.161917
132  0.313643398 0.3561644 6.161917
133  0.315789944 0.3561644 6.161917
134  0.317039340 0.3561644 6.161917
135  0.319185886 0.3123288 6.161917
136  0.323305331 0.3123288 6.161917
137  0.333166013 0.3123288 6.161917
138  0.343232177 0.3123288 6.161917
139  0.356721095 0.3123288 5.868493
140  0.357685890 0.3123288 5.868493
141  0.372426824 0.3123288 5.731507
142  0.396104763 0.3068500 5.668493
143  0.400858083 0.3068500 5.668493
144  0.409317080 0.3068500 5.668493
145  0.412231436 0.3068500 5.668493
146  0.431631195 0.3068494 5.476713
147  0.435238642 0.3068494 5.328766
148  0.438634584 0.3068494 5.328766
149  0.443935781 0.3068494 5.328766
150  0.454761257 0.3068494 5.295892
151  0.462189666 0.3068494 5.295892
152  0.463862627 0.3068494 5.295892
153  0.470247054 0.3068494 5.257534
154  0.478316340 0.2849301 5.257534
155  0.486869833 0.2849301 5.161644
156  0.490265775 0.2849301 5.161644
157  0.500331938 0.2849301 5.142466
158  0.506392448 0.2849301 5.142466
159  0.513421059 0.2684928 5.104108
160  0.513820857 0.2684928 5.104108
161  0.515967404 0.2684928 5.104108
162  0.516458612 0.2684928 5.104108
163  0.529947530 0.2684928 5.087669
164  0.532094077 0.2684928 5.087669
165  0.542380174 0.2684928 5.008219
166  0.565175875 0.2657548 4.778082
167  0.566416842 0.2657548 4.778082
168  0.568563388 0.2657548 4.736986
169  0.582543515 0.2657548 4.720549
170  0.592338404 0.2657548 4.369863
171  0.594011364 0.2657548 4.369863
172  0.608465077 0.2657541 4.273972
173  0.620562591 0.2657541 4.213698
174  0.621927183 0.2657541 4.109587
175  0.635416101 0.2657541 4.073973
176  0.641326942 0.2657541 4.000000
177  0.646116141 0.2657541 4.000000
178  0.660096268 0.2465747 3.893150
179  0.673558373 0.2465747 3.813698
180  0.687047292 0.2465747 3.753423
181  0.688012086 0.2465747 3.753423
182  0.689193839 0.2465747 3.753423
183  0.703173965 0.2383554 3.739727
184  0.739643277 0.2383554 3.334247
185  0.741789823 0.2383554 3.334247
186  0.742557633 0.2383554 3.334247
187  0.755769950 0.2273978 3.301370
188  0.761957392 0.2273978 3.301370
189  0.765564839 0.2273978 3.298630
190  0.794188823 0.2273978 3.254795
191  0.817196029 0.2246569 3.098630
192  0.836718644 0.2246569 3.032876
193  0.860273727 0.2082189 2.917807
194  0.892106129 0.2082189 2.838355
195  0.912869712 0.2082189 2.764383
196  0.958313889 0.2000009 2.630138
197  0.967415258 0.2000009 2.619178
198  0.981868971 0.1890431 2.586299
199  0.990422464 0.1890431 2.572601
200  1.020011243 0.1890431 2.520549
201  1.033500162 0.1890431 2.430137
202  1.034464956 0.1890431 2.430137
203  1.086096147 0.1808222 2.273971
204  1.097563996 0.1808222 2.271234
205  1.112017709 0.1808222 2.205478
206  1.140641693 0.1315088 2.178083
207  1.155095406 0.1315088 2.161644
208  1.193237678 0.1315088 2.120548
209  1.206726597 0.1287665 2.106849
210  1.270790430 0.1287665 1.989041
211  1.336875334 0.1232873 1.912329
There were 50 or more warnings (use warnings() to see the first 50)

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