# synchrony: Make potentials object-mating synchrony In stuartWagenius/mateable: Tools to Assess Mating Potential in Space and Time

## Description

Calculate one of a variety of measures of mating synchrony.

## Usage

 ```1 2 3``` ```synchrony(scene, method, subject = "all", averageType = "mean", syncNN = 1, compareToSelf = FALSE, frame = "within", resolution = "daily") ```

## Arguments

 `scene` a matingScene object that includes the flowering schedule for the scene of interest. `method` character, partial matching allowed, describing what type of synchrony will be calculated. "augspurger" is based on the method described in Augspurger (1983). "kempenaers" is based on the method described in Kempenaers (1993). "sync_prop" will calculate individual synchrony based on the proportion of the sum of all individuals' days available to mate that coincided with the individual's days available for mating. "overlap" is based on the method described in Ison et al. (2014) and will calculate a synchrony value based on the number of days both individuals were flowering divided by the number of days either individual was available for mating. "sync_nn" gives the average of the kth nearest neighbor, or rather the kth most synchronous individual. "peak-n" will calculate the number of individuals receptive on the peak day (day with highest mating receptivity) divided by the number of individuals in the population. "peak-observations" will calculate the number of individuals receptive on the peak day divided by the total number of observations - this method is useful for comparing to data that has no information on individuals. "average-peak" calculates the average (determined by argument `averageType`) number of individuals receptive per day divided by the maximum number of individuals receptive per day. All "simple" methods do not have pairwise or individual values. "mean_interactions" gives the mean number of potential mating interactions an individual obtains per unit time for the period that the individual was flowering. `subject` one of "population", "pairwise", "individual", or "all" - see Value for more details. `averageType` character. Identifies whether to take the mean or median when calculating averages `syncNN` integer between 1 and n-1 (inclusive) or numeric between 0 and 1 (exclusive). The kth nearest neighbor to be averaged when calculating population synchrony. If k is in (0,1) then the k*nth nearest neighbor will be found `compareToSelf` logical. Whether or not to include self comparisons when calculation synchrony. Defaults to FALSE. `frame` the timeframe that synchrony is to be calculated over; options are 'within,' for synchrony within a season, or 'between,' for synchrony across multiple seasons. Defaults to 'within'. `resolution` if `method = sync_prop`, indicates whether temporal resolution should be yearly or daily

## Details

Measures of synchrony are based on methods described in Augspurger (1983), Kempenaers (1983), and from Ison et al. (2014), as well as variations on different factors of those measures.

## Value

A potentials object containing one more more of the following, depending the input for `subject`:
If `subject` is "population" `synchrony` will return a numeric value that has a range depending on the `method`. If `subject` is "pairwise" `synchrony` will return a matrix with all pairwise synchrony comparisons. It is important to note two things: [1] if `method` is set to "sync_nn" then the pairwise comparisons will be in descending order and cannot be indexed by ID order. [2] if `compareToSelf` is set to FALSE, the matrix will have dimensions 100 rows by 99 columns. Similar to `overlap`, indexing will be affected. If `subject` is "individual" `synchrony` will returns a data frame with a row for id and a row for individual synchrony. If `subject` is "all" `synchrony` will return a list containing the values described above for population, pairwise, and individual synchrony.

## Author(s)

Danny Hanson, Amy Waananen

## References

Augspurger, C.K. (1983) Phenology, flowering synchrony, and fruit set of six neotropical shrubs. Biotropica 15, 257-267.

Ison, J.L., S. Wagenius, D. Reitz., M.V. Ashley. (2014) Mating between Echinacea angustifolia (Asteraceae) individuals increases with their flowering synchrony and spatial proximity. American Journal of Botany 101, 180-189

Kempenaers, B. (1993) The use of a breeding synchrony index. Ornis Scandinavica, 24, 1.

## Examples

 ```1 2 3 4 5``` ```pop <- simulateScene(size = 150) synchrony(pop, "augs") pop2 <- simulateScene(size = 1234, sdDur = 5, sk = 1) syncVals <- synchrony(pop2, "sync_nn", "all", "median", 123) ```

stuartWagenius/mateable documentation built on May 30, 2019, 8:34 p.m.