Skip to contents

Computes the leave-one-out estimates, pseudovalues, influence values, and bias-corrected jackknife estimate with a native leave-one-out loop: \(\hat b = (n-1)(\bar\theta_{(\cdot)} - \hat\theta)\) and \(\widehat{se} = \sqrt{(n-1)/n \sum (\theta_{(i)} - \bar\theta_{(\cdot)})^2}\), the same quantities as bootstrap::jackknife (cross-validated in the test suite). Matrices / data frames are deleted one row at a time.

Usage

jackknife(data, statistic, ci_level = 0.95)

Arguments

data

Numeric vector or matrix.

statistic

Function returning a scalar.

ci_level

Confidence level.

Value

A morie_jackknife_result.

Examples

set.seed(1)
x <- rnorm(40)
res <- jackknife(x, mean)
res$se
#> [1] 0.1401944