limits.tilt(boot.obj, probs = c(25, 50, 950, 975)/1000, L = resampGetL(boot.obj), t.adjustment = F, subset.statistic = 1:p, subjectDivide = F, modifiedStatistic = NULL, initial, tol = 1e-6, tol.tau = tol, maxiter = 20, indices, group, treatment, weights, frame.eval)
TRUE
then intervals are slightly wider, using an
adjustment for uncertainty in standard error estimates
(like using t-quantiles rather than normal-quantiles in the usual
confidence intervals for a mean).
boot.obj
was by
subject. Internal calculations involve assigning weights to subjects;
if
TRUE
then the weight for each subject is divided among observations
for that subject before calculating the statistic;
if
FALSE
the subject weight is replicated to observations for that subject.
weights
argument, then pass this to indicate how to
call your function.
See "DETAILS", below.
tau
.
tau
values such
that one-sided coverage probabilities are within
tol
of the specified values.
tau
on the scale of
tau
.
boot.obj
.
boot.obj
.
boot.obj
.
boot.obj
.
boot.obj
can be found.
You need to specify this if objects can't be found by their
original names, or have changed; see
.
probs
and one row per parameter.
The matrix has class
limits.tilt
, and attributes:
The overall limits are the most conservative of the exponential and maximum likelihood limits.
There is a
print
method, that prints just the overlal confidence limits;
to print all attributes use
print(unclass(x))
.
This function recalculates the bootstrap statistic by adding tilting weights.
For purposes of adding weights, the name
"Splus.resamp.weights"
is reserved for internal use. To
avoid naming conflicts, that name can not be used as
a variable name in the
data
argument to
boot.obj
, if
data
is a data frame.
When the bootstrap statistic is an expression, for example
mean(x)
, a modified expression
mean(x, weights = Splus.resamp.weights)
is created.
Only calls to functions that have an argument named
weights
are modified; e.g.
sum(x)/length(x)
would fail because
sum
does not have a
weights
argument.
If the expression calls a function with a "hidden" weights argument,
e.g. you may pass weights as part of the
...
list, then
use the
modifiedStatistic
argument to specify that, e.g.
modifiedStatistic = myFun(x, weights = Splus.resamp.weights)
.
(You must use the name
Splus.resamp.weights
in
modifiedStatistic
.)
An expression such as
mean(y[a==1])
is converted to
mean(y[a==1], weights = Splus.resamp.weights)
which will fail because the weights vector was not subscripted along
with
y
.
In cases such as these pass a function that performs the desired
calculations, or use
modifiedStatistic = mean(y[a==1], weights = Splus.resamp.weights[a==1])
.
An error occurs if the bootstrap statistic can not be successfully
modified to accomodate weights and
modifiedStatistic
is not provided.
The derivation of the intervals assumes that the bootstrap statistic
is "functional", depending only on the empirical proportions,
not the sample size. For example,
var(x)
is not functional, because
it uses a divisor of
n-1
rather than
n
;
var(c(x,x))
gives a different
answer;
var(x, unbiased=F)
is the functional version.
However, in practice the interval is forgiving, provided that any
non-functionality affects the bootstrap observed value and replicates
the same, and the statistic uses the functional form when weights
are supplied. In particular, intervals for
var
and
stdev
are the same whether you specify
unbiased=FALSE
or not when
creating the bootstrap object.
Bootstrap tilting limits are an area of active research, and the function may be revised accordingly.
DiCiccio, T. J. and J. P. Romano (1990), "Nonparametric Confidence Limits by Resampling Methods and Least Favorable Families," International Statistical Review, 58, 59-76.
Efron, B. (1981), "Nonparametric Standard Errors and Confidence Intervals," Canadian Journal of Statistics, 9, 139-172.
Hesterberg, T.C. (1999), "Bootstrap Tilting Confidence Intervals and Hypothesis Tests", Computing Science and Statistics, 31, 389-393, Interface Foundation of North America, Fairfax Station, VA.
Hesterberg, T.C. (1999), "Bootstrap Tilting Confidence Intervals", Technical Report No. 84, http://www.insightful.com/Hesterberg
temp <- bootstrap(stack.loss, mean, B=200) limits.tilt(temp)