jackknife_error: Estimates error from jackknife samples

jackknife_errorR Documentation

Estimates error from jackknife samples

Description

Computes the jackknife error which is just

∑_{i=0}^N (x_i - \bar x)^2 \,.

Internally we use

\frac{(N-1)^2}{N} \mathop{\mathrm{sd}}(X)

in order to benefit from the optimized standard deviation function.

The width of the bootstrap distribution does not change with the number of elements. The jackknife distribution crucially depends on the number of measurements that one started with. Therefore we cannot just drop the NA values and are done with it. Instead we need to rescale with the √{N / m} where N is the number of original measurements and m is the number of non-NA values. With NA values removed we would otherwise underestimate the uncertainty.

Usage

jackknife_error(samples, boot.l = 1, na.rm = FALSE)

Arguments

samples

Numeric vector.

boot.l

Block length for bootstrapping.

na.rm

Logical. Determines whether NA values shall be removed, see Description for details.

Details

Currently this uses the mean over the jackknife samples in order to compute the error. It would be better in the case of a bias to use the mean over the original data instead. This would require a second parameter and therefore is incompatible with the previously used sd everywhere for the bootstrap samples. As the sd for the bootstrap samples also does not include the original data, this likely is similar in terms of bias.

Value

returns a single numeric representing the jackknife estimate of error


hadron documentation built on Sept. 9, 2022, 5:06 p.m.