jackknife_error | R Documentation |
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.
jackknife_error(samples, boot.l = 1, na.rm = FALSE)
samples |
Numeric vector. |
boot.l |
Block length for bootstrapping. |
na.rm |
Logical. Determines whether |
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.
returns a single numeric representing the jackknife estimate of error
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.