compareCkern: Compare circular distributions.

Description Usage Arguments Details Value References See Also Examples

View source: R/activity_code_1_1.r

Description

Randomisation test for the probability that two sets of circular observations come from the same distribution.

Usage

1
compareCkern(y1, y2, reps = 1000, index = c("Dhat4", "Dhat5", "Dhat1"))

Arguments

y1, y2

Numeric vectors of radian data.

reps

Number of bootstrap iterations.

index

Which of the three indices returned by overlap::overlapEst to use.

Details

Calculates overlap index (see references) for the observed data samples, then generates a null distribution of overlap indices using data sampled randomly with replacement from the combined data. This randomised distribution is then used to estimate the probability that the observed overlap arose by chance.

Value

A named 2-element vector: Overlap = observed overlap index; p = probability observed index arose by chance.

References

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

See Also

overlapEst

Examples

1
2
3
4
5
#Example with bootstrap reps limited to speed up
data(BCItime)
tPaca <- 2*pi*BCItime$time[BCItime$species=="paca"]
tRat <- 2*pi*BCItime$time[BCItime$species=="rat"]
compareCkern(tPaca,tRat,reps=10)

activity documentation built on May 30, 2017, 8:18 a.m.