hrest: Home ranges

hr_akdeR Documentation

Home ranges

Description

Functions to calculate animal home ranges from a ⁠track_xy*⁠. hr_mcp, hr_kde, and hr_locoh calculate the minimum convex polygon, kernel density, and local convex hull home range respectively.

Usage

hr_akde(x, ...)

## S3 method for class 'track_xyt'
hr_akde(
  x,
  model = fit_ctmm(x, "iid"),
  keep.data = TRUE,
  trast = make_trast(x),
  levels = 0.95,
  wrap = FALSE,
  ...
)

hr_kde(x, ...)

## S3 method for class 'track_xy'
hr_kde(
  x,
  h = hr_kde_ref(x),
  trast = make_trast(x),
  levels = 0.95,
  keep.data = TRUE,
  wrap = FALSE,
  ...
)

hr_locoh(x, ...)

## S3 method for class 'track_xy'
hr_locoh(
  x,
  n = 10,
  type = "k",
  levels = 0.95,
  keep.data = TRUE,
  rand_buffer = 1e-05,
  ...
)

hr_mcp(x, ...)

hr_od(x, ...)

Arguments

x

[track_xy, track_xyt]
A track created with make_track.

...

Further arguments, none implemented.

model

A continuous time movement model. This can be fitted either with ctmm::ctmm.fit or fit_ctmm.

keep.data

⁠[logic(1)]⁠
Should the original tracking data be included in the estimate?

trast

⁠[SpatRast]⁠
A template raster for kernel density home-ranges.

levels

⁠[numeric]⁠
The isopleth levels used for calculating home ranges. Should be ⁠0 < level < 1⁠.

wrap

⁠[logical(1)]⁠
If TRUE the UD is wrapped (see terra::wrap()).

h

⁠[numeric(2)]⁠
The bandwidth for kernel density estimation.

n

⁠[integer(1)]⁠
The number of neighbors used when calculating local convex hulls.

type

k, r or a. Type of LoCoH.

rand_buffer

⁠[numeric(1)]⁠
Random buffer to avoid polygons with area 0 (if coordinates are numerically identical).

Value

A hr-estimate.

References

Worton, B. J. (1989). Kernel methods for estimating the utilization distribution in home-range studies. Ecology, 70(1), 164-168. C. H. Fleming, W. F. Fagan, T. Mueller, K. A. Olson, P. Leimgruber, J. M. Calabrese, “Rigorous home-range estimation with movement data: A new autocorrelated kernel-density estimator”, Ecology, 96:5, 1182-1188 (2015).

Fleming, C. H., Fagan, W. F., Mueller, T., Olson, K. A., Leimgruber, P., & Calabrese, J. M. (2016). Estimating where and how animals travel: an optimal framework for path reconstruction from autocorrelated tracking data. Ecology, 97(3), 576-582.

Examples


data(deer)
mini_deer <- deer[1:100, ]

# MCP ---------------------------------------------------------------------
mcp1 <- hr_mcp(mini_deer)
hr_area(mcp1)

# calculated MCP at different levels
mcp1 <- hr_mcp(mini_deer, levels = seq(0.3, 1, 0.1))
hr_area(mcp1)

# CRS are inherited
get_crs(mini_deer)
mcps <- hr_mcp(mini_deer, levels = c(0.5, 0.95, 1))
has_crs(mcps)

# Kernel density estimaiton (KDE) -----------------------------------------
kde1 <- hr_kde(mini_deer)
hr_area(kde1)
get_crs(kde1)

# akde
data(deer)
mini_deer <- deer[1:20, ]
ud1 <- hr_akde(mini_deer) # uses an iid ctmm
ud2 <- hr_akde(mini_deer, model = fit_ctmm(deer, "ou")) # uses an OU ctmm

# od

data(deer)
ud1 <- hr_od(deer) # uses an iid ctmm
ud2 <- hr_akde(deer, model = fit_ctmm(deer, "ou")) # uses an OU ctmm


amt documentation built on June 25, 2024, 1:14 a.m.