Learn R Programming

MF (version 4.3.2)

MFBoot: Bootstrap MF CI

Description

Estimates bootstrap confidence intervals for the mitigated fraction.

Usage

MFBoot(formula, data, compare = c("con", "vac"), b = 100, B = 100, alpha = 0.05, hpd = TRUE, bca = FALSE, return.boot = FALSE, trace.it = FALSE)

Arguments

formula
Formula of the form y ~ x, where y is a continuous response and x is a factor with two levels
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? Default TRUE.
bca
Estimate BCa intervals? Default FALSE.
return.boot
Save the bootstrap sample of the MF statistic? Default FALSE.
trace.it
Verbose tracking of the cycles? Default FALSE.

Value

a mfboot-class data object

Details

Resamples the data and produces bootstrap confidence intervals. Equal tailed intervals are estimated by the percentile method. Highest density intervals are estimated by selecting the shortest of all possible intervals. For BCa intervals, see Efron and Tibshirani section 14.3.

References

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

mfboot-class

Examples

Run this code
MFBoot(lesion~group, calflung)

# 10000 bootstrap samples
# 95% confidence interval
#
# Comparing vac to con
#                 observed median  lower  upper
# Equal Tailed        0.44 0.4464 0.1360 0.7056
# Highest Density     0.44 0.4464 0.1456 0.7088

Run the code above in your browser using DataLab