This documents standard methods for FRAIR objects of class frboot
. However, because standard naming conventions have been used, some undocumented utility functions might also work (e.g. coefficients
)
The code underlying confint.frboot
is quite complex and relies heavily on the excellent work done by Brian Ripley in boot.ci
. Some of the complexity of boot.ci
is hidden, but, like all FRAIR objects you can access the original method by passing the output directly (e.g. boot.ci(object$fit)
).
Like print.bootci
the print()
method for objects produced by print.frboot
will report potentially unstable intervals. However, these are calculated and returned by confint.frboot
, not when print()
is called (see Value, below). When calling confint.frboot
you can request (a combination of) different intervals. The default 'all'
is equivalent to c('norm', 'basic', 'stud', 'perc', 'bca')
which are the Normal approximation, Basic, Studentised, Percentile and BCa intervals, respectively. Each has strengths and weaknesses which the user should be aware of.
lines
and drawpoly
only add lines or polygons to an existing plot, so an active graphics device needs to be present. By default all
is FALSE. The simple reason for this is because the code is a little slow (on some devices), so currently it is an 'opt-in' option.
drawpoly
draws empirical confidence intervals. The intervals are constructed by evaluating every set of bootstrapped coefficients at:
seq(from=min(x$x), to=max(x$x), length.out = 50)
.
and then calculating the empirical confidence limits at each value of x by:
apply(val, 2, quantile, na.rm=T, probs=probs)
Note that this is a rough approximation of a bootstrapped confidence interval and does not account for some of the intricacies (e.g. bootstrap bias) described in boot.ci.
Note also, that if tozero
is TRUE, then both lines
and drawpoly
attempt to draw to zero by evaluating every set of bootstrapped coefficients at:
seq(from=0, to=max(x$x), length.out = 50)
If the coefficients provided by a fit to the orginal data produce a value that is undefined at zero, then these functions will plot lines to a small, non-zero number (1e-04) instead (with a warning). However, this does not guarantee that all of the values produced by the bootstrapped coefficients will produce sensible values. Clearly the intention here is to provide a nice-looking representation of the fitted curve and it is up to the user to determine why their desired curve is undefined at zero.