overlapEst: Estimates of coefficient of overlapping

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/overlapEst.R

Description

Calculates up to three estimates of activity pattern overlap based on times of observations for two species.

Usage

1
2
overlapEst(A, B, kmax = 3, adjust=c(0.8, 1, 4), n.grid = 128,
    type=c("all", "Dhat1", "Dhat4", "Dhat5"))

Arguments

A

a vector of times of observations of species A in radians, ie. scaled to [0, ].

B

a vector of times of observations of species B in radians.

kmax

maximum value of k for optimal bandwidth estimation.

adjust

bandwidth adjustment; either a single value used for all 3 overlap estimates, or a vector of 3 different values. This corresponds to 1/c in Ridout & Linkie 2009.

n.grid

number of points at which to estimate density for comparison between species; smaller values give lower precision but run faster in simulations and bootstraps.

type

the name of the estimator to use: Dhat4 is recommended if both samples are larger then 50, otherwise use Dhat1. See Details. The default is "all" for compatibility with older versions.

Details

See overlapTrue for the meaning of coefficient of overlapping, Δ.

These estimators of Δ use kernel density estimates fitted to the data to approximate the true density functions f(t) and g(t). Schmid & Schmidt (2006) propose five estimators of overlap:

Dhat1 is calculated from vectors of densities estimated at T equally-spaced times, t, between 0 and :

Equation for Dhat1

For circular distributions, Dhat2 is equivalent to Dhat1, and Dhat3 is inapplicable.

Dhat4 and Dhat5 use vectors of densities estimated at the times of the observations of the species, x and y:

Equation for Dhat4

Equation for Dhat5

where n, m are the sample sizes and I is the indicator function (1 if the condition is true, 0 otherwise).

Dhat5 simply checks which curve is higher at each point; even tiny changes in the data can result in large, discontinuous changes in Dhat5, and it can take values > 1. Don't use Dhat5.

Comparing curves at times of actual observations works well if there are enough observations of each species. Simulations show that Dhat4 is best when the smallest sample has at least 50 observations. Dhat1 compares curves at n.grid equally spaced points, and is best for small samples.

Value

If type = all, a named vector of three estimates of overlap, otherwise a single estimate. Will be NA if optimal bandwidth estimation failed.

Author(s)

Mike Meredith, based on work by Martin Ridout.

References

Ridout & Linkie (2009) Estimating overlap of daily activity patterns from camera trap data. Journal of Agricultural, Biological, and Environmental Statistics 14:322-337

Schmid & Schmidt (2006) Nonparametric estimation of the coefficient of overlapping - theory and empirical application, Computational Statistics and Data Analysis, 50:1583-1596.

See Also

overlapTrue.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Get example data:
data(simulatedData)

# Use defaults:
overlapEst(tigerObs, pigObs)
#     Dhat1     Dhat4     Dhat5 
# 0.2908618 0.2692011 0.2275000 

overlapEst(tigerObs, pigObs, type="Dhat4")
#    Dhat4
#    0.2692011

overlap documentation built on May 29, 2017, 8:05 p.m.