hdrs.conf: Calculate bootstrap confidence intervals for the HDR-based...

Description Usage Arguments Value Note Examples

View source: R/hdrs.conf.R

Description

Calculate bootstrap confidence intervals for the HDR-based synchrony metric

Usage

1
2
hdrs.conf(x, ci = 95, p = 80, nsim = 5000, nboot = 5000,
  ncores = 1)

Arguments

x

A vector of individual completion times for the focal activity.

ci

A number indicating the desired confidence level. The default is 95.

p

A number indicating the percentage of individuals that have completed the focal activity. The default is 80.

nsim

The number of simulations used to esimtate the HDR. The default is 5000.

nboot

The number of bootstrap replicates used to estimate the CIs. The default is 5000.

ncores

The number of processor cores over which to distribute the nboot replicates. The default is 1.

Value

A named numerical vector containing the lower and upper confidence limits for the hdrs metric.

Note

The hdrs metric quantifies the amount of time it took for p percent of the sampled individuals to complete the specified activity (e.g., mating, calving, etc...). Therefore, a smaller hdrs value indicates a more synchronous population, while a larger hdrs value indicates less synchrony.

The ncores argument specifies the number of processor cores over which the foreach loop will distribute bootstrap re-samples. This should be set no higher than the number of hyperthreaded cores on your machine, which is usually twice the number of physical cores.

Examples

1
2
x <- rexp(25)
hdrs.conf(x, nboot=250)

jmcalabrese/hdrs documentation built on May 22, 2019, 5:34 p.m.