distance | R Documentation |

This function calculates various square distances measures between distributions, including the, Bhattacharyya distance, Mahalanobis distance, and Euclidean distance.

distance(object,method="Mahalanobis",level=0.95,debias=TRUE,...)

`object` |
A |

`method` |
Square distance measure to return: |

`level` |
The confidence level desired for the output. |

`debias` |
Approximate debiasing of the square distance. |

`...` |
Not currently used. |

A table of confidence intervals on the square distance estimate. A value of `0`

implies that the two distributions have the same mean location, while larger values imply that the two distributions are farther apart. The square Euclidean distance has units of square meters. The square Mahalanobis and Bhattacharyya distances are unitless.

The Bhattacharyya distance (BD) is naturally of a squared form and is not further squared.

C. H. Fleming

`ctmm.fit`

, `overlap`

# 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) ) # using ctmm.fit here for speed, but you should almost always use ctmm.select FITS <- lapply(1:2, function(i) ctmm.fit(buffalo[[i]],GUESS[[i]]) ) names(FITS) <- names(buffalo[1:2]) # Mahalanobis distance between these two buffalo distance(FITS)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.