tiltBootProbs(tau, boot.obj, tilt = "exponential", subset.statistic = 1, observed = *, replicates = *, L = *, indices = *, group = *, treatment = *, weights = *, normalizeWeights = T, tol = 1e-06, maxiter = 50, frame.eval = sys.parent(1)) * means that by default the argument is extracted from boot.obj, and subscripted using subset.statistic if appropriate.
NULL
, or vector the same length as
L
, indicating stratified sampling or
multiple-group problems; unique values of this vector determine groups.
boot.obj
.
NULL
, or vector the same length as
replicates
, typically resulting
from importance sampling.
TRUE
weights are normalized to mean 1
before calling C code. If
FALSE
they are not normalized; this yields
more accurate results when a good importance sampling design was used.
lambda
values such
that tilting weights sum within each group to within
tol
of 1.
Used only for multiple-group
"ml"
tilting.
tau
which
bracket the solution for each
q
(after the root is bracketed additional
iterations may be performed).
boot.obj
can be found.
You need to specify this if objects can't be found by their
original names, or have changed; see
.
This is used in calculating default values of
L
and
indices
.
Exponential tilting places probability proportional to
weights * exp(tau * (L-Lbar))
on the values in
L
, where
Lbar
is the mean of
L
.
Maximum likelihood tilting places probabilities proportional to
weights * 1/(1 - tau * (L-Lbar))
These weights are empirical maximum likelihood weights, in that they maximize
the product of probabilities subject to the weighted mean matching
a specified value.
For
tau<0
, the answer is an estimate of
P(bootstrap replicate
>=
observed).
For
tau>0
, the answer is an estimate of
1 - P(bootstrap replicate
<=
observed).
See examples below.
Bootstrap tilting interval correspond to finding the values of
tau
that make
p
equal to specified confidence levels, using that
tau
to calculated tilting weights for the original observations,
and recalculating the observed value using the original data but
these weights. This process is performed by
.
Hesterberg, T.C. (2003), "Tilting Calculations for Resampling Inferences and Approximations", Research Report No. 103, Research Department, Insightful Corp., 1700 Westlake Ave. N., Suite 500, Seattle, WA 98109.
bfit <- bootstrap(1:30, mean, save.indices=T) tiltBootProbs(c(.01, .02, .03), bfit) # Information on what calculations are performed x <- 1:30 boot <- bootstrap(1:30, mean, seed=0) tiltBootProbs(c(-.01, .01), boot) # 0.3127023 0.6711574 tau <- -0.01 # Case 1, tau < 0 # Now do the calculations by hand, for comparison w <- tiltWeights(tau, resampGetL(boot)) # This is the general way w <- exp(tau * x); w <- w/sum(w) # This gives the same answer here mean((boot$replicates >= boot$observed) * indexProducts(30*w, resampGetIndices(boot))) # That gives 0.3127023, which matches tiltBootProbs tau <- 0.01 # Case 2: tau > 0 w <- tiltWeights(tau, resampGetL(boot)) 1 - mean((boot$replicates <= boot$observed) * indexProducts(30*w, resampGetIndices(boot))) # That gives 0.6711574, which matches tiltBootProbs