triqs::stat::jackknife
#include <triqs/stat.hpp>
Synopsis
template<typename F, typename A>auto jackknife (F && f, A const &… a) template<typename F, typename T>auto jackknife (F && f, accumulator<T> const &… a)
Calculate the value and error of a general function \(f\) of the average of sampled observables \(f\left(\langle \mathbf{a} \rangle\right)\), using jackknife resampling.
1) Directly pass data-series in vector like objects
2) Pass accumulators, where the jacknife acts on the linear binned data
Template parameters
F return type of function f which acts on data
A vector-like object, defining size() and []
T type of data stored in the accumulators
Parameters
a one or multiple series with data: \(\mathbf{a} = \{a_1, a_2, a_3, \ldots\}\) Pre-condition: if more than one series is passed, the series have to be equal in size
f a function which acts on the \(i^\mathrm{th}\) elements of the series in a:
Returns
std::tuple with four statistical estimators \(\left(f_\mathrm{J}^{*}, \Delta{f}_\mathrm{J}, f_\mathrm{J}, f_\mathrm{direct}\right)\), defined below.
- Jackknife resampling takes \(N\) data points \(\mathbf{a}[i]\) and creates \(N\) samples (“jackknifed data”), which we denote \(\tilde{\mathbf{a}}[i]\). We calculate three statistical estimators for \(f\left(\langle \mathbf{a} \rangle\right)\):
The function \(f\) applied to observed mean of the data
The jacknife estimate defined as
The jacknife estimate, with bias correction to remove \(O(1/N)\) effects
Additionally, an estimate in the errror of \(f\left(\langle \mathbf{a} \rangle\right)\) is given by the jacknife as
where \(\sigma_f\) is the standard deviation of \(\left\{f(\tilde{\mathbf{a}}[0]), f(\tilde{\mathbf{a}}[1]), \ldots, f(\tilde{\mathbf{a}}[N])\right\}\).