control(boot.out, L=NULL, distn=NULL, index=1, t0=NULL, t=NULL,
bias.adj=FALSE, alpha=NULL, ...)
boot
. The bootstrap replicates must
have been generated using the usual nonparametric bootstrap.L
is not
supplied then empinf
is called to calculate them from boot.out
.smooth.spline
giving the distribution
function of the linear approximation. This is used only if bias.adj
is
FALSE
. Normally this would be found using a saddlepoint approximboot.out$statistic
.boot.out$data
. This argument is used only if bias.adj
is FALSE
. The
input value is ignored if t
is not also supplied. The defaubias.adj
is FALSE
. The input is ignored if t0
is not
supplied also. The default value is boot.out$t[,index]
.TRUE
specifies that the adjusted bias estimate
using post-simulation balance is all that is required. If bias.adj
is
FALSE
(default)
then the linear approximation to the statistic is cbias.adj
is FALSE
.boot.out$statistic
requires. These are passed
unchanged every time boot.out$statistic
is called. boot.out$statistic
is
called once if bias.adj
is TRUE
, otherbias.adj
is TRUE
then the returned value is the adjusted bias estimate.
If bias.adj
is FALSE
then the returned value is a list with the following
components
empinf
.t
of the statistic of
interest.t
as a control
variate.t
as a
control variate.t
as a control variate.t
as a control
variate.smooth.spline
describing the saddlepoint approximation
to the bootstrap distribution of the linear approximation to t
. If distn
was supplied on input then
this is the same as the input otherwise it is calculated by a call to
saddle.distn
.bias.adj
is FALSE
then the linear approximation to the statistic is
found and
evaluated at each bootstrap replicate. Then using the equation
T*=Tl*+(T*-Tl*), moment estimates can be found. For quantile estimation
the distribution of the linear approximation to t
is approximated very
accurately by saddlepoint methods, this is then combined with the bootstrap
replicates to approximate the bootstrap distribution of t
and hence to
estimate the bootstrap quantiles of t
.Davison, A.C., Hinkley, D.V. and Schechtman, E. (1986) Efficient bootstrap simulation. Biometrika, 73, 555--566.
Efron, B. (1990) More efficient bootstrap computations. Journal of the American Statistical Association, 55, 79--89.
boot
, empinf
, k3.linear
, linear.approx
, saddle.distn
, smooth.spline
, var.linear
library(modreg) # for smooth.spline
# Use of control variates for the variance of the air-conditioning data
mean.fun <- function(d, i)
{ m <- mean(d$hours[i])
n <- nrow(d)
v <- (n-1)*var(d$hours[i])/n^2
c(m, v)
}
data(aircondit)
air.boot <- boot(aircondit, mean.fun, R=999)
control(air.boot,index=2,bias.adj=TRUE)
air.cont <- control(air.boot, index=2)
# Now let us try the variance on the log scale.
air.cont1 <- control(air.boot, t0=log(air.boot$t0[2]), t=log(air.boot$t[,2]))
Run the code above in your browser using DataLab