Calculate control variate adjustment for a bootstrap object

DESCRIPTION:

Calculate new weights for a bootstrap distribution, based on the difference between a linear approximation to the statistic(s) of interest and the theoretical mean and variance of the approximation.

USAGE:

controlVariates(x, 
         subset.covariates = 1:p, 
         moments = 2, 
         ..., L, group, treatment, frame.eval) 

REQUIRED ARGUMENTS:

x
a bootstrap object.
subset.covariates
if supplied and the statistic is multidimensional, this is used to select a subset of the columns for use in computing the control variates. If too many columns are used the computed weights may be undesirably noisy.
moments
integer, either 1 or 2; how many moments (from each component of a multidimensional statistic) to control for.
...
additional arguments to pass to controlVariates.default, in particular method and positive. Should not include weights. Currently only method="linear" is supported with moments=2, or if subset.covariates has length > 1.
L
This argument is normally extracted from x or computed if needed; you need to supply it only if it cannot be computed. Similarly for group, treatment, and frame.eval.
group
treatment
frame.eval

VALUE:

The output is an object of class "controlVariates.bootstrap", similar to x but with:
estimate
new values of Mean, Bias, and SE, calculated using weights selected to match one or two theoretical moments of a linear approximation to the statistic (or columns of a multivariate statistic) being bootstrapped.
weights
the compute weights, vector of length B, the number of bootstrap samples.

DETAILS:

See the detailed explanation in .

If the original bootstrap object x contained weights then this is the product of those weights with adjustments to match the specified moments

If x is a bootstrap2 object, weights and estimates are only computed for the main object, not the two contained bootstrap objects.

REFERENCES:

Hesterberg, T.C. and Nelson, B.L. (1998), "Control Variates for Probability and Quantile Estimation," Management Science, 44(9), 1295-1312.

Hesterberg, T.C. (1996), "Control Variates and Importance Sampling for Efficient Bootstrap Simulations," Statistics and Computing 6(2), 147-157.

SEE ALSO:

, , , .

EXAMPLES:

boot <- bootstrap(1:9, mean, seed=0, save.indices=T) 
boot2 <- controlVariates(boot) 
boot 
boot2  # note that Mean = 5, Bias = 0, and  
       # SE = sqrt( mean( (1:9-5)^2 ) / 9 )