Description Usage Arguments Details Value Warning References See Also Examples
This function calculates the empirical influence values for a statistic applied to a data set. It allows four types of calculation, namely the infinitesimal jackknife (using numerical differentiation), the usual jackknife estimates, the ‘positive’ jackknife estimates and a method which estimates the empirical influence values using regression of bootstrap replicates of the statistic. All methods can be used with one or more samples.
1 2 3 
boot.out 
A bootstrap object created by the function 
data 
A vector, matrix or data frame containing the data for which
empirical influence values are required. It is a required argument
if 
statistic 
The statistic for which empirical influence values are required. It
must be a function of at least two arguments, the data set and a
vector of weights, frequencies or indices. The nature of the second
argument is given by the value of 
type 
The calculation type to be used for the empirical influence
values. Possible values of 
stype 
A character variable giving the nature of the second argument to

index 
An integer giving the position of the variable of interest in the
output of 
t 
A vector of length 
strata 
An integer vector or a factor specifying the strata for multisample
problems. If 
eps 
This argument is used only if 
... 
Any other arguments that 
If type
is "inf"
then numerical differentiation is used
to approximate the empirical influence values. This makes sense only
for statistics which are written in weighted form (i.e. stype
is "w"
). If type
is "jack"
then the usual
leaveoneout jackknife estimates of the empirical influence are
returned. If type
is "pos"
then the positive
(includeonetwice) jackknife values are used. If type
is
"reg"
then a bootstrap object must be supplied. The regression
method then works by regressing the bootstrap replicates of
statistic
on the frequency array from which they were derived.
The bootstrap frequency array is obtained through a call to
boot.array
. Further details of the methods are given in
Section 2.7 of Davison and Hinkley (1997).
Empirical influence values are often used frequently in nonparametric
bootstrap applications. For this reason many other functions call
empinf
when they are required. Some examples of their use are
for nonparametric delta estimates of variance, BCa intervals and
finding linear approximations to statistics for use as control
variates. They are also used for antithetic bootstrap resampling.
A vector of the empirical influence values of statistic
applied
to data
. The values will be in the same order as the
observations in data.
All arguments to empinf
must be passed using the name =
value
convention. If this is not followed then unpredictable
errors can occur.
Davison, A.C. and Hinkley, D.V. (1997) Bootstrap Methods and Their Application. Cambridge University Press.
Efron, B. (1982) The Jackknife, the Bootstrap and Other Resampling Plans. CBMSNSF Regional Conference Series in Applied Mathematics, 38, SIAM.
Fernholtz, L.T. (1983) von Mises Calculus for Statistical Functionals. Lecture Notes in Statistics, 19, SpringerVerlag.
boot
, boot.array
, boot.ci
,
control
, jack.after.boot
,
linear.approx
, var.linear
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 30 31 32  # The empirical influence values for the ratio of means in
# the city data.
ratio < function(d, w) sum(d$x *w)/sum(d$u*w)
empinf(data = city, statistic = ratio)
city.boot < boot(city, ratio, 499, stype="w")
empinf(boot.out = city.boot, type = "reg")
# A statistic that may be of interest in the difference of means
# problem is the tstatistic for testing equality of means. In
# the bootstrap we get replicates of the difference of means and
# the variance of that statistic and then want to use this output
# to get the empirical influence values of the tstatistic.
grav1 < gravity[as.numeric(gravity[,2]) >= 7,]
grav.fun < function(dat, w) {
strata < tapply(dat[, 2], as.numeric(dat[, 2]))
d < dat[, 1]
ns < tabulate(strata)
w < w/tapply(w, strata, sum)[strata]
mns < as.vector(tapply(d * w, strata, sum)) # drop names
mn2 < tapply(d * d * w, strata, sum)
s2hat < sum((mn2  mns^2)/ns)
c(mns[2]  mns[1], s2hat)
}
grav.boot < boot(grav1, grav.fun, R = 499, stype = "w",
strata = grav1[, 2])
# Since the statistic of interest is a function of the bootstrap
# statistics, we must calculate the bootstrap replicates and pass
# them to empinf using the t argument.
grav.z < (grav.boot$t[,1]grav.boot$t0[1])/sqrt(grav.boot$t[,2])
empinf(boot.out = grav.boot, t = grav.z)

[1] 1.04367815 0.58417763 0.37092459 0.18958996 0.03164142 0.10544878
[7] 0.09236345 0.20365074 1.02178280 0.73381132
1 1 1 1 1 1
1.134757852 0.690500523 0.422648985 0.313473861 0.006019012 0.051681304
1 1 1 1
0.087130711 0.257533117 1.134827744 1.024189334
1 1 1 1 1 1 1
3.3371917 1.3403676 2.5858061 0.9359045 0.6427848 1.0943951 1.1392478
1 1 1 1 1 1 2
0.4724795 1.1751290 3.2199896 1.4664898 3.7801729 9.4110635 2.6528988
2 2 2 2 2 2 2
4.4210173 3.8210699 1.1787047 2.6316977 3.2273006 2.5497123 0.2584223
2 2 2 2 2
1.6969633 0.2820192 1.8180048 1.6587477 1.9087877
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.