encounter: Encounter statistics

View source: R/encounter.R

encounterR Documentation

Encounter statistics

Description

Functions to calculate encounter probabilities [IN DEVELOPMENT] and the conditional location distribution of where encounters take place (conditional on said encounters taking place), as described in Noonan et al (2021).

Usage

encounter(data,UD,method="ECDF",debias=TRUE,level=0.95,r=NULL,res.time=1,normalize=FALSE,
          self=TRUE,...)

cde(object,include=NULL,exclude=NULL,debias=FALSE,...) 

Arguments

data

A list of telemetry objects.

UD

A list of aligned UD objects.

method

Encounter probability calculation method: trajectory based ("ECDF") or distribution based ("PDF").

debias

Approximate bias corrections.

level

Confidence level for relative encounter rates.

r

Grid of distances for ECDF calculation.

res.time

Relative time-grid resolution for predicting ECDF distances.

normalize

Normalize relative encounter rates by the average uncorrelated self-encounter rate.

self

Fix the self-interaction rate appropriately.

include

A matrix of interactions to include in the calculation (see Details below).

exclude

A matrix of interactions to exclude in the calculation (see Details below).

...

Additional arguments for future use.

Details

[OUTDATED] Encounter probabilities are standardized to 1 meter, and must be multiplied by the square encounter radius (in meters), to obtain other values. If normalize=FALSE, the relative encounter rates have units of 1/m^2 and tend to be very small numbers for very large home-range areas. If normalize=TRUE, the relative encounter rates are normalized by the average uncorrelated self-encounter rate, which is an arbitrary value that provides a convenient scaling.

The include argument is a matrix that indicates which interactions are considered in the calculation. By default, include = 1 - diag(length(object)), which implies that all interactions are considered aside from self-interactions. Alternatively, exclude = 1 - include can be specified, and is by-default exclude = diag(length(object)), which implies that only self-encounters are excluded.

Value

encounter produces an array of standardized encounter probabilities with CIs, while cde produces a single UD object.

Note

Prior to v1.2.0, encounter() calculated the CDE and rates() calculated relative encounter probabilities.

Author(s)

C. H. Fleming

References

M. J. Noonan, R. Martinez-Garcia, G. H. Davis, M. C. Crofoot, R. Kays, B. T. Hirsch, D. Caillaud, E. Payne, A. Sih, D. L. Sinn, O. Spiegel, W. F. Fagan, C. H. Fleming, J. M. Calabrese, “Estimating encounter location distributions from animal tracking data”, Methods in Ecology and Evolution (2021) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/2041-210X.13597")}.

See Also

akde, overlap

Examples


# Load package and data
library(ctmm)
data(buffalo)

# fit models for first two buffalo
GUESS <- lapply(buffalo[1:2], function(b) ctmm.guess(b,interactive=FALSE) )
# in general, you should use ctmm.select here
FITS <- lapply(1:2, function(i) ctmm.fit(buffalo[[i]],GUESS[[i]]) )
names(FITS) <- names(buffalo[1:2])

# create aligned UDs
UDS <- akde(buffalo[1:2],FITS)

# calculate 100-meter encounter probabilities
P <- encounter(buffalo,UDS,method="PDF")
P$CI * 100^2

# calculate CDE
CDE <- cde(UDS)

# plot data and encounter distribution
plot(buffalo[1:2],col=c('red','blue'),UD=CDE,col.DF='purple',col.level='purple',col.grid=NA)

ctmm-initiative/ctmm documentation built on Jan. 31, 2025, 8:36 a.m.