bootstrap: Fit model on Bootstrap sample

Description Usage Arguments Examples

Description

These functions help to repeatedly fit a rfh model on bootstrap samples. Use bootstrap as a user interface. boot can be used to extend the framework but is not meant to be used interactively. If you are interested in the parameteric bootstrap for a 'rfh' model you can use the implementation in mse.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
bootstrap(object, matV = variance(object), B = NULL, ...)

boot(object, matV, B, ...)

## S4 method for signature 'ANY,ANY,integerORnumeric'
boot(object, matV, B, filter = NULL,
  postProcessing = identity, ...)

## S4 method for signature 'rfh,rfhVariance,'NULL''
boot(object, matV, B, ...)

Arguments

object

a fitted object

matV

the variance of a fitted object used to draw samples. In most cases this is object. Alternatively it may be useful to use a non-robust model.

B

the number of repetitions

...

arguments passed down to methods

filter

a vector indicating which elements in the fittedd object to keep in each repetition.

postProcessing

a function to process the results. Is applied before the filter.

Examples

1
2
3
4
5
data(milk, package = "sae")
milk$samplingVar <- milk$SD^2
modelFit <- rfh(yi ~ as.factor(MajorArea), milk, "samplingVar")
bootstrapCoefs <- bootstrap(modelFit, B = 2, filter = "coefficients")
do.call(rbind, unlist(bootstrapCoefs, FALSE))

wahani/saeRobustTools documentation built on May 3, 2019, 8:09 p.m.