lir_bootstrap: Nonparametric bootstrap sampling for animal movement data

View source: R/Bootstrap.R

lir_bootstrapR Documentation

Nonparametric bootstrap sampling for animal movement data

Description

Generate bootstrap samples from original observations by sampling individuals with replacement.

Usage

lir_bootstrap(X, tp, seed = NULL)

Arguments

X

A list or matrix containing identities of individuals identified per sampling period

tp

A set of observation time

seed

Random seed; the default is NULL

Details

For more details on this function, please see Efron and Tibshirani (1993).

Value

The bootstrap samples of animal movement data.

References

Efron, B., & Tibshirani, R. J. (1986). Bootstrap methods for standard errors, confidence intervals, and other measures of statistical accuracy. Statistical science, 1(1), 54-75.

Efron, B., & Tibshirani, R. J. (1993). An introduction to the bootstrap. Chapman and Hall Press.

Examples

# Example
# load data
data(simulationA)
tp <- simulationA@tp
# if X is a list
list_simulation_A <- simulationA@list_simulation_A
bootstrap_sample <- lir_bootstrap(list_simulation_A, tp)
# if X is a matrix
matrix_simulation_A <- simulationA@matrix_simulation_A
bootstrap_sample <- lir_bootstrap(matrix_simulation_A, tp)


Alexhaoge/rCLIFII documentation built on Sept. 28, 2023, 11:23 p.m.