Rev 2086 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{control}\alias{control}\title{Control Variate Calculations}\description{This function will find control variate estimates from a bootstrapoutput object. It can either find the adjusted bias estimate usingpost-simulation balancing or it can estimate the bias, variance, thirdcumulant and quantiles, using the linear approximation as a controlvariate.}\usage{control(boot.out, L = NULL, distn = NULL, index = 1, t0 = NULL,t = NULL, bias.adj = FALSE, alpha = NULL, \dots)}\arguments{\item{boot.out}{A bootstrap output object returned from \code{boot}. The bootstrapreplicates must have been generated using the usual nonparametricbootstrap.}\item{L}{The empirical influence values for the statistic of interest. If\code{L} is not supplied then \code{empinf} is called to calculatethem from \code{boot.out}.}\item{distn}{If present this must be the output from \code{smooth.spline} givingthe distribution function of the linear approximation. This is usedonly if \code{bias.adj} is \code{FALSE}. Normally this would befound using a saddlepoint approximation. If it is not supplied inthat case then it is calculated by \code{saddle.distn}.}\item{index}{The index of the variable of interest in the output of\code{boot.out$statistic}.}\item{t0}{The observed value of the statistic of interest on the original dataset \code{boot.out$data}. This argument is used only if\code{bias.adj} is \code{FALSE}. The input value is ignored if\code{t} is not also supplied. The default value is is\code{boot.out$t0[index]}.}\item{t}{The bootstrap replicate values of the statistic of interest. Thisargument is used only if \code{bias.adj} is \code{FALSE}. The inputis ignored if \code{t0} is not supplied also. The default value is\code{boot.out$t[,index]}.}\item{bias.adj}{A logical variable which if \code{TRUE} specifies that the adjustedbias estimate using post-simulation balance is all that is required.If \code{bias.adj} is \code{FALSE} (default) then the linearapproximation to the statistic is calculated and used as a controlvariate in estimates of the bias, variance and third cumulant aswell as quantiles.}\item{alpha}{The alpha levels for the required quantiles if \code{bias.adj} is\code{FALSE}.}\item{\dots}{Any additional arguments that \code{boot.out$statistic} requires.These are passed unchanged every time \code{boot.out$statistic} iscalled. \code{boot.out$statistic} is called once if \code{bias.adj}is \code{TRUE}, otherwise it may be called by \code{empinf} forempirical influence calculations if \code{L} is not supplied.}}\value{If \code{bias.adj} is \code{TRUE} then the returned value is theadjusted bias estimate.If \code{bias.adj} is \code{FALSE} then the returned value is a listwith the following components\item{L}{The empirical influence values used. These are the input values ifsupplied, and otherwise they are the values calculated by\code{empinf}.}\item{tL}{The linear approximations to the bootstrap replicates \code{t} ofthe statistic of interest.}\item{bias}{The control estimate of bias using the linear approximation to\code{t} as a control variate.}\item{var}{The control estimate of variance using the linear approximation to\code{t} as a control variate.}\item{k3}{The control estimate of the third cumulant using the linearapproximation to \code{t} as a control variate.}\item{quantiles}{A matrix with two columns; the first column are the alpha levelsused for the quantiles and the second column gives the correspondingcontrol estimates of the quantiles using the linear approximation to\code{t} as a control variate.}\item{distn}{An output object from \code{smooth.spline} describing thesaddlepoint approximation to the bootstrap distribution of thelinear approximation to \code{t}. If \code{distn} was supplied oninput then this is the same as the input otherwise it is calculatedby a call to \code{saddle.distn}.}}\details{If \code{bias.adj} is \code{FALSE} then the linear approximation tothe statistic is found and evaluated at each bootstrap replicate.Then using the equation \emph{T* = Tl*+(T*-Tl*)}, moment estimates canbe found. For quantile estimation the distribution of the linearapproximation to \code{t} is approximated very accurately bysaddlepoint methods, this is then combined with the bootstrapreplicates to approximate the bootstrap distribution of \code{t} andhence to estimate the bootstrap quantiles of \code{t}.}\references{Davison, A.C. and Hinkley, D.V. (1997)\emph{Bootstrap Methods and Their Application}. Cambridge University Press.Davison, A.C., Hinkley, D.V. and Schechtman, E. (1986) Efficient bootstrapsimulation. \emph{Biometrika}, \bold{73}, 555--566.Efron, B. (1990) More efficient bootstrap computations.\emph{Journal of the American Statistical Association}, \bold{55}, 79--89.}\seealso{\code{\link{boot}}, \code{\link{empinf}}, \code{\link{k3.linear}}, \code{\link{linear.approx}}, \code{\link{saddle.distn}}, \code{\link{smooth.spline}}, \code{\link{var.linear}}}\examples{# Use of control variates for the variance of the air-conditioning datamean.fun <- function(d, i){ m <- mean(d$hours[i])n <- nrow(d)v <- (n-1)*var(d$hours[i])/n^2c(m, v)}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]))}\keyword{nonparametric}