Learn R Programming

amt (version 0.1.4)

hr_akde: Home ranges

Description

Functions to calculate animal home ranges from a track_xy*, and to work with home ranges. hr_mcp, hr_kde, and hr_locoh calculate the minimum convex polygon, kernel density, and local convex hull home range respectively. hr_area extracts the area of an home range, hr_isopleths returns the isopleth as a SpatialPolygonsDataFrame.

Usage

hr_akde(x, ...)

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

hr_area(x, ...)

# S3 method for hr hr_area(x, units = FALSE, ...)

# S3 method for akde hr_area(x, units = FALSE, ...)

hr_isopleths(x, ...)

hr_kde(x, ...)

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

hr_kde_ref(x, ...)

# S3 method for track_xy hr_kde_ref(x, rescale = "none", ...)

hr_kde_pi(x, ...)

# S3 method for track_xy hr_kde_pi(x, rescale = "none", correct = TRUE, ...)

hr_kde_lscv( x, range = do.call(seq, as.list(c(hr_kde_ref(x) * c(0.1, 2), length.out = 100))), which_min = "global", rescale = "none", trast = raster(as_sp(x), nrow = 100, ncol = 100) )

hr_locoh(x, ...)

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

hr_mcp(x, ...)

# S3 method for track_xy hr_mcp(x, levels = 0.95, keep.data = TRUE, ...)

hr_od(x, ...)

# S3 method for track_xyt hr_od( x, model = fit_ctmm(x, "iid"), keep.data = TRUE, trast = make_trast(x), levels = 0.95, ... )

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(2)] Should the original tracking data be included in the estimate?

trast

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

levels

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

units

[logic(1)] Should areas be returned as units? If FALSE areas are returned as numeric values.

h

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

rescale

[character(1)] Rescaling method for reference bandwidth calculation. Must be one of "unitvar", "xvar", or "none".

correct

Logical scalar that indicates whether or not the estimate should be correct for the two dimensional case.

range

numeric vector with different candidate h values.

which_min

A character indicating if the global or local minimum should be searched for.

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

The bandwidth, the standardization method and correction.

vector of length two

Details

The implementation of the reference bandwidth calculation is based on Worton (1989). If variances differ greatly, it is advisable to rescale the data using rescale = "unitvar" the data is suspected to multimodal other bandwidth estimation methods may be more suitable.

hr_kde_lscv calculates least square cross validation bandwidth. This implementation is based on Seaman and Powell (1996). If whichMin is "global" the global minimum is returned, else the local minimum with the largest candidate bandwidth is returned.

References

C. H. Fleming, W. F. Fagan, T. Mueller, K. A. Olson, P. Leimgruber, J. M. Calabrese, <U+201C>Rigorous home-range estimation with movement data: A new autocorrelated kernel-density estimator<U+201D>, Ecology, 96:5, 1182-1188 (2015).

Worton, B. J. (1989). Kernel methods for estimating the utilization distribution in home-range studies. Ecology, 70(1), 164-168.

Gitzen, R. A., Millspaugh, J. J., & Kernohan, B. J. (2006). Bandwidth selection for fixed-kernel analysis of animal utilization distributions. Journal of Wildlife Management, 70(5), 1334-1344.

Seaman, D. E., & Powell, R. A. (1996). An evaluation of the accuracy of kernel density estimators for home range analysis. Ecology, 77(7), 2075-2085.

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.

See Also

KernSmooth::dpik

Examples

Run this code
# NOT RUN {
# akde
# }
# NOT RUN {
data(deer)
ud1 <- hr_akde(deer) # uses an iid ctmm
ud2 <- hr_akde(deer, model = fit_ctmm(deer, "ou")) # uses an OU ctmm
# }
# NOT RUN {
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)

# Local Convex Hull (LoCoH) -----------------------------------------------
locoh1 <- hr_locoh(mini_deer)
hr_area(locoh1)

# calculated Locoh at different levels
locoh <- hr_locoh(mini_deer, levels = seq(0.3, 1, 0.1))
hr_area(locoh)


# Kernel density estimaiton (KDE) -----------------------------------------
kde1 <- hr_kde(mini_deer)
hr_area(kde1)
get_crs(kde1)
# od
# }
# NOT RUN {
data(deer)
ud1 <- hr_od(deer) # uses an iid ctmm
ud2 <- hr_akde(deer, model = fit_ctmm(deer, "ou")) # uses an OU ctmm
# }

Run the code above in your browser using DataLab