-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.html
11110 lines (9227 loc) · 531 KB
/
boot.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Package 'boot' reference manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<!-- styling for math. katex.min.css expects fonts in same dir so use CDN -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css">
<link rel="stylesheet" type="text/css" href="https://r-universe.dev/static/R.css">
<link rel="stylesheet" type="text/css" href="https://r-universe.dev/static/prism.css">
<!-- for (future) customizations -->
<script src="https://r-universe.dev/static/manual.js"></script>
<link rel="stylesheet" type="text/css" href="https://r-universe.dev/static/manual.css?nocache=1">
</head>
<body class="postdoc macintosh">
<h1 class="manual-title">Package 'boot'</h1>
<table class="description-table">
<tr>
<th>Title:</th>
<td class="description-title">Bootstrap Functions (Originally by Angelo Canty for S)</td>
</tr>
<tr>
<th>Description:</th>
<td class="description-description">Functions and datasets for bootstrapping from the
book "Bootstrap Methods and Their Application" by A. C. Davison and
D. V. Hinkley (1997, CUP), originally written by Angelo Canty for S.</td>
</tr>
<tr>
<th>Authors:</th>
<td class="description-author"><span>Angelo Canty [aut] (author of original code for S),
Brian Ripley [aut, trl] (conversion to R, maintainer 1999--2022, author
of parallel support),
Alessandra R. Brazzale [ctb, cre] (minor bug fixes)</span></td>
</tr>
<tr>
<th>Maintainer:</th>
<td class="description-maintainer">Alessandra R. Brazzale <[email protected]></td>
</tr>
<tr>
<th>License:</th>
<td class="description-license">Unlimited</td>
</tr>
<tr>
<th>Version:</th>
<td class="description-version">1.3-30</td>
</tr>
<tr>
<th>Built:</th>
<td class="description-date">2024-06-15 17:28:41 UTC</td>
</tr>
<tr>
<th>Source:</th>
<td class="description-source">CRAN</td>
</tr>
</table>
<a href="#help-index" style="color:black;"><h2 id="help-index">Help Index</h2></a>
<ul id="help-index-list">
<li class="help-index-item"><a href="#abc.ci">
Nonparametric ABC Confidence Intervals
</a></li>
<li class="help-index-item"><a href="#acme">
Monthly Excess Returns
</a></li>
<li class="help-index-item"><a href="#aids">
Delay in AIDS Reporting in England and Wales
</a></li>
<li class="help-index-item"><a href="#aircondit">
Failures of Air-conditioning Equipment
</a></li>
<li class="help-index-item"><a href="#amis">
Car Speeding and Warning Signs
</a></li>
<li class="help-index-item"><a href="#aml">
Remission Times for Acute Myelogenous Leukaemia
</a></li>
<li class="help-index-item"><a href="#beaver">
Beaver Body Temperature Data
</a></li>
<li class="help-index-item"><a href="#bigcity">
Population of U.S. Cities
</a></li>
<li class="help-index-item"><a href="#boot">
Bootstrap Resampling
</a></li>
<li class="help-index-item"><a href="#boot.array">
Bootstrap Resampling Arrays
</a></li>
<li class="help-index-item"><a href="#boot.ci">
Nonparametric Bootstrap Confidence Intervals
</a></li>
<li class="help-index-item"><a href="#brambles">
Spatial Location of Bramble Canes
</a></li>
<li class="help-index-item"><a href="#breslow">
Smoking Deaths Among Doctors
</a></li>
<li class="help-index-item"><a href="#calcium">
Calcium Uptake Data
</a></li>
<li class="help-index-item"><a href="#cane">
Sugar-cane Disease Data
</a></li>
<li class="help-index-item"><a href="#capability">
Simulated Manufacturing Process Data
</a></li>
<li class="help-index-item"><a href="#catsM">
Weight Data for Domestic Cats
</a></li>
<li class="help-index-item"><a href="#cav">
Position of Muscle Caveolae
</a></li>
<li class="help-index-item"><a href="#cd4">
CD4 Counts for HIV-Positive Patients
</a></li>
<li class="help-index-item"><a href="#cd4.nested">
Nested Bootstrap of cd4 data
</a></li>
<li class="help-index-item"><a href="#censboot">
Bootstrap for Censored Data
</a></li>
<li class="help-index-item"><a href="#channing">
Channing House Data
</a></li>
<li class="help-index-item"><a href="#claridge">
Genetic Links to Left-handedness
</a></li>
<li class="help-index-item"><a href="#cloth">
Number of Flaws in Cloth
</a></li>
<li class="help-index-item"><a href="#co.transfer">
Carbon Monoxide Transfer
</a></li>
<li class="help-index-item"><a href="#coal">
Dates of Coal Mining Disasters
</a></li>
<li class="help-index-item"><a href="#control">
Control Variate Calculations
</a></li>
<li class="help-index-item"><a href="#corr">
Correlation Coefficient
</a></li>
<li class="help-index-item"><a href="#cum3">
Calculate Third Order Cumulants
</a></li>
<li class="help-index-item"><a href="#cv.glm">
Cross-validation for Generalized Linear Models
</a></li>
<li class="help-index-item"><a href="#darwin">
Darwin's Plant Height Differences
</a></li>
<li class="help-index-item"><a href="#dogs"> Cardiac Data for Domestic Dogs </a></li>
<li class="help-index-item"><a href="#downs.bc">
Incidence of Down's Syndrome in British Columbia
</a></li>
<li class="help-index-item"><a href="#ducks">
Behavioral and Plumage Characteristics of Hybrid Ducks
</a></li>
<li class="help-index-item"><a href="#EEF.profile"> Empirical Likelihoods</a></li>
<li class="help-index-item"><a href="#empinf">
Empirical Influence Values
</a></li>
<li class="help-index-item"><a href="#envelope">
Confidence Envelopes for Curves
</a></li>
<li class="help-index-item"><a href="#exp.tilt">
Exponential Tilting
</a></li>
<li class="help-index-item"><a href="#fir">
Counts of Balsam-fir Seedlings
</a></li>
<li class="help-index-item"><a href="#freq.array">
Bootstrap Frequency Arrays
</a></li>
<li class="help-index-item"><a href="#frets">
Head Dimensions in Brothers
</a></li>
<li class="help-index-item"><a href="#glm.diag">
Generalized Linear Model Diagnostics
</a></li>
<li class="help-index-item"><a href="#glm.diag.plots">
Diagnostics plots for generalized linear models
</a></li>
<li class="help-index-item"><a href="#gravity">
Acceleration Due to Gravity
</a></li>
<li class="help-index-item"><a href="#hirose">
Failure Time of PET Film
</a></li>
<li class="help-index-item"><a href="#Imp.Estimates">
Importance Sampling Estimates
</a></li>
<li class="help-index-item"><a href="#imp.weights">
Importance Sampling Weights
</a></li>
<li class="help-index-item"><a href="#inv.logit">
Inverse Logit Function
</a></li>
<li class="help-index-item"><a href="#islay">
Jura Quartzite Azimuths on Islay
</a></li>
<li class="help-index-item"><a href="#jack.after.boot">
Jackknife-after-Bootstrap Plots
</a></li>
<li class="help-index-item"><a href="#k3.linear">
Linear Skewness Estimate
</a></li>
<li class="help-index-item"><a href="#linear.approx">
Linear Approximation of Bootstrap Replicates
</a></li>
<li class="help-index-item"><a href="#lines.saddle.distn">
Add a Saddlepoint Approximation to a Plot
</a></li>
<li class="help-index-item"><a href="#logit">
Logit of Proportions
</a></li>
<li class="help-index-item"><a href="#manaus">
Average Heights of the Rio Negro river at Manaus
</a></li>
<li class="help-index-item"><a href="#melanoma">
Survival from Malignant Melanoma
</a></li>
<li class="help-index-item"><a href="#motor">
Data from a Simulated Motorcycle Accident
</a></li>
<li class="help-index-item"><a href="#neuro">
Neurophysiological Point Process Data
</a></li>
<li class="help-index-item"><a href="#nitrofen">
Toxicity of Nitrofen in Aquatic Systems
</a></li>
<li class="help-index-item"><a href="#nodal">
Nodal Involvement in Prostate Cancer
</a></li>
<li class="help-index-item"><a href="#norm.ci">
Normal Approximation Confidence Intervals
</a></li>
<li class="help-index-item"><a href="#nuclear">
Nuclear Power Station Construction Data
</a></li>
<li class="help-index-item"><a href="#paulsen">
Neurotransmission in Guinea Pig Brains
</a></li>
<li class="help-index-item"><a href="#plot.boot">
Plots of the Output of a Bootstrap Simulation
</a></li>
<li class="help-index-item"><a href="#poisons">
Animal Survival Times
</a></li>
<li class="help-index-item"><a href="#polar">
Pole Positions of New Caledonian Laterites
</a></li>
<li class="help-index-item"><a href="#print.boot">
Print a Summary of a Bootstrap Object
</a></li>
<li class="help-index-item"><a href="#print.bootci">
Print Bootstrap Confidence Intervals
</a></li>
<li class="help-index-item"><a href="#print.saddle.distn">
Print Quantiles of Saddlepoint Approximations
</a></li>
<li class="help-index-item"><a href="#print.simplex">
Print Solution to Linear Programming Problem
</a></li>
<li class="help-index-item"><a href="#remission">
Cancer Remission and Cell Activity
</a></li>
<li class="help-index-item"><a href="#saddle">
Saddlepoint Approximations for Bootstrap Statistics
</a></li>
<li class="help-index-item"><a href="#saddle.distn">
Saddlepoint Distribution Approximations for Bootstrap Statistics
</a></li>
<li class="help-index-item"><a href="#saddle.distn.object">
Saddlepoint Distribution Approximation Objects
</a></li>
<li class="help-index-item"><a href="#salinity">
Water Salinity and River Discharge
</a></li>
<li class="help-index-item"><a href="#simplex">
Simplex Method for Linear Programming Problems
</a></li>
<li class="help-index-item"><a href="#simplex.object">
Linear Programming Solution Objects
</a></li>
<li class="help-index-item"><a href="#smooth.f">
Smooth Distributions on Data Points
</a></li>
<li class="help-index-item"><a href="#sunspot">
Annual Mean Sunspot Numbers
</a></li>
<li class="help-index-item"><a href="#survival">
Survival of Rats after Radiation Doses
</a></li>
<li class="help-index-item"><a href="#tau">
Tau Particle Decay Modes
</a></li>
<li class="help-index-item"><a href="#tilt.boot">
Non-parametric Tilted Bootstrap
</a></li>
<li class="help-index-item"><a href="#tsboot">
Bootstrapping of Time Series
</a></li>
<li class="help-index-item"><a href="#tuna">
Tuna Sighting Data
</a></li>
<li class="help-index-item"><a href="#urine">
Urine Analysis Data
</a></li>
<li class="help-index-item"><a href="#var.linear">
Linear Variance Estimate
</a></li>
<li class="help-index-item"><a href="#wool">
Australian Relative Wool Prices
</a></li>
</ul>
<hr>
<div class="manual-pages-content">
<div class="container manual-page" id="abc.ci"><div class="page-main">
<a href="#abc.ci" class="help-page-title"><h2>
Nonparametric ABC Confidence Intervals
</h2></a>
<h3>Description</h3>
<p>Calculate equi-tailed two-sided nonparametric approximate bootstrap confidence
intervals for a parameter, given a set of data and an estimator of the
parameter, using numerical differentiation.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">abc.ci(data, statistic, index=1, strata=rep(1, n), conf=0.95,
eps=0.001/n, ...)
</code><code class="language-r">abc.ci<span class="token punctuation">(</span>data<span class="token punctuation">,</span> statistic<span class="token punctuation">,</span> index<span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">,</span> strata<span class="token operator">=</span>rep<span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span> n<span class="token punctuation">)</span><span class="token punctuation">,</span> conf<span class="token operator">=</span><span class="token number">0.95</span><span class="token punctuation">,</span>
eps<span class="token operator">=</span><span class="token number">0.001</span><span class="token operator">/</span>n<span class="token punctuation">,</span> <span class="token ellipsis">...</span><span class="token punctuation">)</span></code></pre>
<h3 class="r-arguments-title">Arguments</h3>
<table>
<tr>
<td><code id="data">data</code></td>
<td>
<p>A data set expressed as a vector, matrix or data frame.
</p>
</td>
</tr>
<tr>
<td><code id="statistic">statistic</code></td>
<td>
<p>A function which returns the statistic of interest. The function must
take at least 2 arguments; the first argument should be the data and the
second a vector of weights. The weights passed to <code>statistic</code> will be
normalized to sum to 1 within each stratum. Any other arguments should be
passed to <code>abc.ci</code> as part of the <code>...{}</code> argument.
</p>
</td>
</tr>
<tr>
<td><code id="index">index</code></td>
<td>
<p>If <code>statistic</code> returns a vector of length greater than 1, then this indicates
the position of the variable of interest within that vector.
</p>
</td>
</tr>
<tr>
<td><code id="strata">strata</code></td>
<td>
<p>A factor or numerical vector indicating to which sample each
observation belongs in multiple sample problems. The default
is the one-sample case.
</p>
</td>
</tr>
<tr>
<td><code id="conf">conf</code></td>
<td>
<p>A scalar or vector containing the confidence level(s) of the required
interval(s).
</p>
</td>
</tr>
<tr>
<td><code id="eps">eps</code></td>
<td>
<p>The value of epsilon to be used for the numerical differentiation.
</p>
</td>
</tr>
<tr>
<td><code id="...">...</code></td>
<td>
<p>Any other arguments for <code>statistic</code>. These will be passed unchanged to
<code>statistic</code> each time it is called within <code>abc.ci</code>.
</p>
</td>
</tr>
</table>
<h3>Details</h3>
<p>This function is based on the function <code>abcnon</code> written by R. Tibshirani.
A listing of the original function is available in DiCiccio and Efron (1996).
The function uses numerical differentiation for the first and second
derivatives of the statistic and then uses these values to approximate
the bootstrap BCa intervals. The total number of evaluations of the
statistic is <code>2*n+2+2*length(conf)</code> where <code>n</code> is the number of data points
(plus calculation of the original value of the statistic). The function
works for the multiple sample case
without the need to rewrite the statistic in an artificial form since
the stratified normalization is done internally by the function.
</p>
<h3>Value</h3>
<p>A <code>length(conf)</code> by 3 matrix where each row contains the confidence level
followed by the lower and upper end-points of the ABC interval at that
level.
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997)
<em>Bootstrap Methods and Their Application</em>, Chapter 5.
Cambridge University Press.
</p>
<p>DiCiccio, T. J. and Efron B. (1992) More accurate confidence intervals in
exponential families. <em>Biometrika</em>, <b>79</b>, 231–245.
</p>
<p>DiCiccio, T. J. and Efron B. (1996) Bootstrap confidence intervals (with
Discussion).
<em>Statistical Science</em>, <b>11</b>, 189–228.
</p>
<h3>See Also</h3>
<p><code><a href="#boot.ci">boot.ci</a></code>
</p>
<h3>Examples</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">
# 90% and 95% confidence intervals for the correlation
# coefficient between the columns of the bigcity data
abc.ci(bigcity, corr, conf=c(0.90,0.95))
# A 95% confidence interval for the difference between the means of
# the last two samples in gravity
mean.diff <- function(y, w)
{ gp1 <- 1:table(as.numeric(y$series))[1]
sum(y[gp1, 1] * w[gp1]) - sum(y[-gp1, 1] * w[-gp1])
}
grav1 <- gravity[as.numeric(gravity[, 2]) >= 7, ]
## IGNORE_RDIFF_BEGIN
abc.ci(grav1, mean.diff, strata = grav1$series)
## IGNORE_RDIFF_END
</code><code class="language-r"><span class="token comment"># 90% and 95% confidence intervals for the correlation </span>
<span class="token comment"># coefficient between the columns of the bigcity data</span>
abc.ci<span class="token punctuation">(</span>bigcity<span class="token punctuation">,</span> corr<span class="token punctuation">,</span> conf<span class="token operator">=</span>c<span class="token punctuation">(</span><span class="token number">0.90</span><span class="token punctuation">,</span><span class="token number">0.95</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># A 95% confidence interval for the difference between the means of</span>
<span class="token comment"># the last two samples in gravity</span>
mean.diff <span class="token operator"><-</span> <span class="token keyword">function</span><span class="token punctuation">(</span>y<span class="token punctuation">,</span> w<span class="token punctuation">)</span>
<span class="token punctuation">{</span> gp1 <span class="token operator"><-</span> <span class="token number">1</span><span class="token operator">:</span>table<span class="token punctuation">(</span>as.numeric<span class="token punctuation">(</span>y<span class="token operator">$</span>series<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>
sum<span class="token punctuation">(</span>y<span class="token punctuation">[</span>gp1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">*</span> w<span class="token punctuation">[</span>gp1<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">-</span> sum<span class="token punctuation">(</span>y<span class="token punctuation">[</span><span class="token operator">-</span>gp1<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">*</span> w<span class="token punctuation">[</span><span class="token operator">-</span>gp1<span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>
grav1 <span class="token operator"><-</span> gravity<span class="token punctuation">[</span>as.numeric<span class="token punctuation">(</span>gravity<span class="token punctuation">[</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">>=</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token punctuation">]</span>
<span class="token comment">## IGNORE_RDIFF_BEGIN</span>
abc.ci<span class="token punctuation">(</span>grav1<span class="token punctuation">,</span> mean.diff<span class="token punctuation">,</span> strata <span class="token operator">=</span> grav1<span class="token operator">$</span>series<span class="token punctuation">)</span>
<span class="token comment">## IGNORE_RDIFF_END</span></code></pre>
<hr>
</div></div>
<div class="container manual-page" id="acme"><div class="page-main">
<a href="#acme" class="help-page-title"><h2>
Monthly Excess Returns
</h2></a>
<h3>Description</h3>
<p>The <code>acme</code> data frame has 60 rows and 3 columns.
</p>
<p>The excess return for the Acme Cleveland Corporation are recorded along with
those for all stocks listed on the New York and American Stock Exchanges were
recorded over a five year period. These excess returns are relative to the
return on a risk-less investment such a U.S. Treasury bills.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">acme
</code><code class="language-r">acme</code></pre>
<h3>Format</h3>
<p>This data frame contains the following columns:
</p>
<dl>
<dt><code>month</code></dt>
<dd>
<p>A character string representing the month of the observation.
</p>
</dd>
<dt><code>market</code></dt>
<dd>
<p>The excess return of the market as a whole.
</p>
</dd>
<dt><code>acme</code></dt>
<dd>
<p>The excess return for the Acme Cleveland Corporation.
</p>
</dd>
</dl>
<h3>Source</h3>
<p>The data were obtained from
</p>
<p>Simonoff, J.S. and Tsai, C.-L. (1994) Use of modified profile likelihood for
improved tests of constancy of variance in regression.
<em>Applied Statistics</em>, <b>43</b>, 353–370.
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997) <em>Bootstrap Methods and Their Application</em>. Cambridge University Press.
</p>
<hr>
</div></div>
<div class="container manual-page" id="aids"><div class="page-main">
<a href="#aids" class="help-page-title"><h2>
Delay in AIDS Reporting in England and Wales
</h2></a>
<h3>Description</h3>
<p>The <code>aids</code> data frame has 570 rows and 6 columns.
</p>
<p>Although all cases of AIDS in England and Wales must be reported to the
Communicable Disease Surveillance Centre, there is often a considerable delay
between the time of diagnosis and the time that it is reported. In estimating
the prevalence of AIDS, account must be taken of the unknown number of cases
which have been diagnosed but not reported. The data set here records the
reported cases of AIDS diagnosed from July 1983 and until the end of 1992.
The data are cross-classified by the date of diagnosis and the time delay in
the reporting of the cases.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">aids
</code><code class="language-r">aids</code></pre>
<h3>Format</h3>
<p>This data frame contains the following columns:
</p>
<dl>
<dt><code>year</code></dt>
<dd>
<p>The year of the diagnosis.
</p>
</dd>
<dt><code>quarter</code></dt>
<dd>
<p>The quarter of the year in which diagnosis was made.
</p>
</dd>
<dt><code>delay</code></dt>
<dd>
<p>The time delay (in months) between diagnosis and reporting. 0 means that the
case was reported within one month. Longer delays are grouped in 3 month
intervals and the value of <code>delay</code> is the midpoint of the interval (therefore
a value of <code>2</code> indicates that reporting was delayed for between 1 and 3
months).
</p>
</dd>
<dt><code>dud</code></dt>
<dd>
<p>An indicator of censoring. These are categories for which full information is
not yet available and the number recorded is a lower bound only.
</p>
</dd>
<dt><code>time</code></dt>
<dd>
<p>The time interval of the diagnosis. That is the number of quarters from July
1983 until the end of the quarter in which these cases were diagnosed.
</p>
</dd>
<dt><code>y</code></dt>
<dd>
<p>The number of AIDS cases reported.
</p>
</dd>
</dl>
<h3>Source</h3>
<p>The data were obtained from
</p>
<p>De Angelis, D. and Gilks, W.R. (1994) Estimating acquired immune
deficiency syndrome accounting for reporting delay.
<em>Journal of the Royal Statistical Society, A</em>, <b>157</b>, 31–40.
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997)
<em>Bootstrap Methods and Their Application</em>.
Cambridge University Press.
</p>
<hr>
</div></div>
<div class="container manual-page" id="aircondit"><div class="page-main">
<a href="#aircondit" class="help-page-title"><h2>
Failures of Air-conditioning Equipment
</h2></a>
<h3>Description</h3>
<p>Proschan (1963) reported on the times between failures of the air-conditioning
equipment in 10 Boeing 720 aircraft. The <code>aircondit</code> data frame contains
the intervals for the ninth aircraft while <code>aircondit7</code> contains those for the
seventh aircraft.
</p>
<p>Both data frames have just one column. Note that the data have been sorted
into increasing order.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">aircondit
</code><code class="language-r">aircondit</code></pre>
<h3>Format</h3>
<p>The data frames contain the following column:
</p>
<dl>
<dt><code>hours</code></dt>
<dd>
<p>The time interval in hours between successive failures of the air-conditioning
equipment
</p>
</dd>
</dl>
<h3>Source</h3>
<p>The data were taken from
</p>
<p>Cox, D.R. and Snell, E.J. (1981)
<em>Applied Statistics: Principles and Examples</em>. Chapman and Hall.
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997)
<em>Bootstrap Methods and Their Application</em>. Cambridge University Press.
</p>
<p>Proschan, F. (1963) Theoretical explanation of observed decreasing failure
rate. <em>Technometrics</em>, <b>5</b>, 375-383.
</p>
<hr>
</div></div>
<div class="container manual-page" id="amis"><div class="page-main">
<a href="#amis" class="help-page-title"><h2>
Car Speeding and Warning Signs
</h2></a>
<h3>Description</h3>
<p>The <code>amis</code> data frame has 8437 rows and 4 columns.
</p>
<p>In a study into the effect that warning signs have on speeding patterns,
Cambridgeshire County Council considered 14 pairs of locations.
The locations were paired to account for factors such as traffic volume
and type of road. One site in each pair had a sign erected warning of the
dangers of speeding and asking drivers to slow down. No action was taken at
the second site. Three sets of measurements were taken at each site. Each set
of measurements was nominally of the speeds of 100 cars but not all sites have
exactly 100 measurements. These speed measurements were taken before the
erection of the sign, shortly after the erection of the sign, and again after
the sign had been in place for some time.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">amis
</code><code class="language-r">amis</code></pre>
<h3>Format</h3>
<p>This data frame contains the following columns:
</p>
<dl>
<dt><code>speed</code></dt>
<dd>
<p>Speeds of cars (in miles per hour).
</p>
</dd>
<dt><code>period</code></dt>
<dd>
<p>A numeric column indicating the time that the reading was taken.
A value of 1 indicates a reading taken before the sign was erected,
a 2 indicates a reading
taken shortly after erection of the sign and a 3 indicates a reading taken
after the sign had been in place for some time.
</p>
</dd>
<dt><code>warning</code></dt>
<dd>
<p>A numeric column indicating whether the location of the reading was chosen to
have a warning sign erected. A value of 1 indicates presence of a sign and a
value of 2 indicates that no sign was erected.
</p>
</dd>
<dt><code>pair</code></dt>
<dd>
<p>A numeric column giving the pair number at which the reading was taken. Pairs
were numbered from 1 to 14.
</p>
</dd>
</dl>
<h3>Source</h3>
<p>The data were kindly made available by Mr. Graham Amis, Cambridgeshire County
Council, U.K.
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997)
<em>Bootstrap Methods and Their Application</em>. Cambridge University Press.
</p>
<hr>
</div></div>
<div class="container manual-page" id="aml"><div class="page-main">
<a href="#aml" class="help-page-title"><h2>
Remission Times for Acute Myelogenous Leukaemia
</h2></a>
<h3>Description</h3>
<p>The <code>aml</code> data frame has 23 rows and 3 columns.
</p>
<p>A clinical trial to evaluate the efficacy of maintenance chemotherapy for
acute myelogenous leukaemia was
conducted by Embury et al. (1977) at Stanford University. After reaching a
stage of remission through treatment by chemotherapy, patients were randomized
into two groups. The first group received maintenance chemotherapy and the
second group did not. The aim of the study was to see if maintenance
chemotherapy increased the length of the remission. The data here formed a
preliminary analysis which was conducted in October 1974.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">aml
</code><code class="language-r">aml</code></pre>
<h3>Format</h3>
<p>This data frame contains the following columns:
</p>
<dl>
<dt><code>time</code></dt>
<dd>
<p>The length of the complete remission (in weeks).
</p>
</dd>
<dt><code>cens</code></dt>
<dd>
<p>An indicator of right censoring. 1 indicates that the patient had a relapse
and so <code>time</code> is the length of the remission. 0 indicates that the patient
had left the study or was still in remission in October 1974, that is the
length of remission is right-censored.
</p>
</dd>
<dt><code>group</code></dt>
<dd>
<p>The group into which the patient was randomized. Group 1 received
maintenance chemotherapy, group 2 did not.
</p>
</dd>
</dl>
<h3>Note</h3>
<p>Package <span class="pkg">survival</span> also has a dataset <code>aml</code>. It is the same
data with different names and with <code>group</code> replaced by a factor
<code>x</code>.
</p>
<h3>Source</h3>
<p>The data were obtained from
</p>
<p>Miller, R.G. (1981) <em>Survival Analysis</em>. John Wiley.
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997)
<em>Bootstrap Methods and Their Application</em>. Cambridge University Press.
</p>
<p>Embury, S.H, Elias, L., Heller, P.H., Hood, C.E., Greenberg, P.L. and
Schrier, S.L. (1977) Remission maintenance therapy in acute myelogenous
leukaemia. <em>Western Journal of Medicine</em>, <b>126</b>, 267-272.
</p>
<hr>
</div></div>
<div class="container manual-page" id="beaver"><div class="page-main">
<a href="#beaver" class="help-page-title"><h2>
Beaver Body Temperature Data
</h2></a>
<h3>Description</h3>
<p>The <code>beaver</code> data frame has 100 rows and 4 columns. It is a multivariate
time series of class <code>"ts"</code> and also inherits from class <code>"data.frame"</code>.
</p>
<p>This data set is part of a long study into body temperature regulation in
beavers. Four adult female beavers were live-trapped and had a
temperature-sensitive radio transmitter surgically implanted. Readings were
taken every 10 minutes. The location of the beaver was also recorded and
her activity level was dichotomized by whether she was in the retreat or
outside of it since high-intensity activities only occur outside of the
retreat.
</p>
<p>The data in this data frame are those readings for one of the beavers on a day
in autumn.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">beaver
</code><code class="language-r">beaver</code></pre>
<h3>Format</h3>
<p>This data frame contains the following columns:
</p>
<dl>
<dt><code>day</code></dt>
<dd>
<p>The day number. The data includes only data from day 307 and early 308.
</p>
</dd>
<dt><code>time</code></dt>
<dd>
<p>The time of day formatted as hour-minute.
</p>
</dd>
<dt><code>temp</code></dt>
<dd>
<p>The body temperature in degrees Celsius.
</p>
</dd>
<dt><code>activ</code></dt>
<dd>
<p>The dichotomized activity indicator. <code>1</code> indicates that the beaver is outside
of the retreat and therefore engaged in high-intensity activity.
</p>
</dd>
</dl>
<h3>Source</h3>
<p>The data were obtained from
</p>
<p>Reynolds, P.S. (1994) Time-series analyses of beaver body temperatures.
In <em>Case Studies in Biometry</em>. N. Lange, L. Ryan, L. Billard,
D. Brillinger, L. Conquest and J. Greenhouse (editors), 211–228. John Wiley.
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997)
<em>Bootstrap Methods and Their Application</em>. Cambridge University Press.
</p>
<hr>
</div></div>
<div class="container manual-page" id="bigcity"><div class="page-main">
<a href="#bigcity" class="help-page-title"><h2>
Population of U.S. Cities
</h2></a>
<h3>Description</h3>
<p>The <code>bigcity</code> data frame has 49 rows and 2 columns.
</p>
<p>The <code>city</code> data frame has 10 rows and 2 columns.
</p>
<p>The measurements are the
population (in 1000's) of 49 U.S. cities in 1920 and 1930. The 49 cities are
a random sample taken from the 196 largest cities in 1920. The <code>city</code> data
frame consists of the first 10 observations in <code>bigcity</code>.
</p>
<h3>Usage</h3>
<pre class="language-r"><code class="language-r-input" hidden="hidden">bigcity
</code><code class="language-r">bigcity</code></pre>
<h3>Format</h3>
<p>This data frame contains the following columns:
</p>
<dl>
<dt><code>u</code></dt>
<dd>
<p>The 1920 population.
</p>
</dd>
<dt><code>x</code></dt>
<dd>
<p>The 1930 population.
</p>
</dd>
</dl>
<h3>Source</h3>
<p>The data were obtained from
</p>
<p>Cochran, W.G. (1977) <em>Sampling Techniques</em>. Third edition. John Wiley
</p>
<h3>References</h3>
<p>Davison, A.C. and Hinkley, D.V. (1997) <em>Bootstrap Methods and Their Application</em>. Cambridge University Press.
</p>
<hr>
</div></div>
<div class="container manual-page" id="boot"><div class="page-main">
<a href="#boot" class="help-page-title"><h2>
Bootstrap Resampling
</h2></a>
<h3>Description</h3>
<p>Generate <code>R</code> bootstrap replicates of a statistic applied to data. Both
parametric and nonparametric resampling are possible. For the nonparametric
bootstrap, possible resampling methods are the ordinary bootstrap, the
balanced bootstrap, antithetic resampling, and permutation.
For nonparametric multi-sample problems stratified resampling is used:
this is specified by including a vector of strata in the call to boot.