# overlap: Calculate the overlap between two stationary distributions In ctmm: Continuous-Time Movement Modeling

## Description

This function calculates a useful measure of similarity between distributions known as the Bhattacharyya coefficient in statistics and simply the fidelity or overlap in quantum and statistical mechanics. It is roughly speaking the ratio of the intersection area to the average individual area. When applied to `ctmm` objects, this function returns the overlap of the two Gaussian distributions. When applied to `telemetry` or (aligned) `UD` objects with corresponding movement models, this function returns the overlap of their (autocorrelated) kernel density estimates.

## Usage

 `1` ``` overlap(object,CTMM=NULL,level=0.95,...) ```

## Arguments

 `object` A `list` of `ctmm` fit, `telemetry`, or aligned `UD` objects to compare. `CTMM` A `list` of `ctmm` fit objects corresponding to `object` list. `level` The confidence level desired for the output. `...` Additional arguments relevant for `akde`, such as `res` and `weights`.

## Value

A table of confidence intervals on the overlap estimate. A value of `1` implies that the two distributions are identical, while a value of `0` implies that the two distributions share no area in common. `ctmm` objects are necessary to provide confidence intervals on the point esitmate.

## Note

Uncertainties in `CTMM1` and `CTMM2` are propagated into the overlap estimate under the approximation that the Bhattacharyya distance is a chi-square random variable.

## Author(s)

C. H. Fleming and K. Winner

`akde`, `ctmm.fit`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```# 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) ) FITS <- lapply(1:2, function(i) ctmm.fit(buffalo[[i]],GUESS[[i]]) ) names(FITS) <- names(buffalo[1:2]) # Gaussian overlap between these two buffalo overlap(FITS) # AKDE overlap between these two buffalo overlap(buffalo[1:2],FITS) ```