Skip to contents

Jackknife Estimation

Usage

# S4 method for DiversityIndex
jackknife(object, f = NULL)

Arguments

object

An R object (typically a DiversityIndex object).

f

A function that takes a single numeric vector (the leave-one-out values of do) as argument.

Value

If f is NULL (the default), jackknife() returns a named numeric

vector with the following elements:

original

The observed value of do applied to object.

mean

The jackknife estimate of mean of do.

bias

The jackknife estimate of bias of do.

error

he jackknife estimate of standard error of do.

If f is a function, jackknife() returns the result of f applied to the leave-one-out values of do.

See also

Other resampling methods: bootstrap(), resample()

Author

N. Frerebeau

Examples

## Data from Conkey 1980, Kintigh 1989
data("cantabria")

## Shannon diversity index
(h <- heterogeneity(cantabria, method = "shannon"))
#> [1] 3.269200 2.955298 2.491683 2.485604 2.329187

## Jackknife resampling
jackknife(h)
#>                  original     mean       bias      error
#> Altamira         3.269200 3.246457 -0.9779158 0.08145529
#> Cueto de la Mina 2.955298 2.932856 -0.9649994 0.15907033
#> El Juyo          2.491683 2.469588 -0.9500688 0.19670002
#> El Cierro        2.485604 2.462723 -0.9838709 0.22195573
#> La Paloma        2.329187 2.305876 -1.0023704 0.25266291

jackknife(h, f = summary)
#>                      Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
#> Altamira         3.230811 3.236056 3.249552 3.246457 3.250979 3.269684
#> Cueto de la Mina 2.902193 2.911984 2.921893 2.932856 2.955298 3.018158
#> El Juyo          2.410614 2.444200 2.491683 2.469588 2.491683 2.529489
#> El Cierro        2.398698 2.425153 2.485604 2.462723 2.485604 2.485604
#> La Paloma        2.227438 2.260234 2.329187 2.305876 2.329187 2.329187