Learn R Programming

activity (version 1.1)

compareCkern: Compare circular distributions.

Description

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

Usage

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.

Value

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

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.

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

Run this code
# NOT RUN {
#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)
# }

Run the code above in your browser using DataLab