Bootstrap CI for MF, HL, and Qdif

Share:

Description

Estimates bootstrap confidence intervals for MF, HL, and Qdif.

Usage

1
2
3
  HLBoot(formula, data, compare = c("con", "vac"), b = 100,
    B = 100, alpha = 0.05, hpd = TRUE, bca = FALSE,
    return.boot = FALSE, trace.it = FALSE, seed = NULL)

Arguments

formula

Formula of the form y ~ x + cluster(w), where y is a continuous response, x is a factor with two levels of treatment, and w is a factor indicating the clusters.

data

Data frame

compare

Text vector stating the factor levels - compare[1] is the control or reference group to which compare[2] is compared

b

Number of bootstrap samples to take with each cycle

B

Number of cycles, giving the total number of samples = B * b

alpha

Complement of the confidence level

hpd

Estimate highest density intervals for MF and HL? Default TRUE.

bca

Estimate BCa intervals for MF? Default FALSE.

return.boot

Save the bootstrap samples of the statistics? Default FALSE.

trace.it

Verbose tracking of the cycles? Default FALSE.

seed

initial seed value. Ignored.

Details

Estimates bootstrap confidence intervals for the mitigated fraction (MF), Hodge-Lehmann estimator (HL), and the difference of medians and quartiles (Qdif). The Hodges-Lehmann estimator is the media difference; it assumes that the two distributions have the same shape and differ by a constant shift.

Value

a mfhlboot-class data object

Author(s)

David Siev david.siev@aphis.usda.gov

References

Hodges JL, Lehmann EL, (1963). Estimates of location based on rank tests. Annals of Mathematical Statistics. 34:598–611.

Siev D, (2005). An estimator of intervention effect on disease severity. Journal of Modern Applied Statistical Methods. 4:500–508.

Efron B, Tibshirani RJ. An Introduction to the Bootstrap. Chapman and Hall, New York, 1993.

See Also

mfhlboot-class

Examples

 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
HLBoot(lesion~group,calflung)

#  Bootstrapping . . . . . . . . . . . .
#
#  10000 bootstrap samples
#  95% confidence intervals
#  Comparing vac to con
#
#
#  Mitigated Fraction
#
#                  observed median  lower  upper
#  Equal Tailed        0.44 0.4464 0.1264 0.7056
#  Highest Density     0.44 0.4464 0.1392 0.7120
#
#
#  Hodges-Lehmann
#
#                  observed   median      lower    upper
#  Equal Tailed    -0.07335 -0.07125 -0.1720537 -0.01430
#  Highest Density -0.07335 -0.07125 -0.1563500 -0.00555
#
#
#  Quartile Differences (quartiles of vac - quartiles of con)
#
#       observed    median      lower     upper
#  Q25 -0.041500 -0.041300 -0.1034000 -0.000905
#  Q50 -0.112525 -0.111175 -0.2811688  0.023200
#  Q75 -0.168000 -0.168000 -0.3858500  0.023975