This package is build to perform the Splitting-Coalescence-Estimation Method (cf. Chazin et al., 2019) to model birth seasonality in studies of herd animals.

## Installation

You can install the latest version of SCEM by using the following command:

devtools::install_github("kserkcho/SCEM")

## Authors

Hannah Chazin, Soudeep Deb, Joshua Falk, Arun Srinivasan

## Methods

We introduce improved methods for statistically assessing birth seasonality and intra-annual variation in δ18O from faunal tooth enamel.

The first method we propose is a new idea that uses a nonparametric clustering procedure to group individuals with similar time series data and estimate birth seasonality based on the clusters. This method is more efficient across different scenarios, especially when less of the tooth row is preserved. The new approach offers a high level of statistical rigor and flexibility in dealing with the time series data produced through intra-individual sampling in isotopic analysis. One can use the function SCEM.R to implement this method.

When using the SCEM to estimate birth seasonality values, it is important to keep two things in mind: 1) While the non-parametric clustering procedure is valid for any kind of time series data, the estimation of birth seasonality is semi-parametric and will not return valid results for non-sinusoidal time series; 2) A simulation study suggests that the SCEM provides accurate estimates of birth seasonality in second molars as long as the tooth enamel has more than 50% of the original crown height present (Chazin et al. 2019, Table 1).

The second method estimates input parameters for use with a previously-developed parametric approach (Tornero et al., 2013). The relevant code for this approach is makeFits_OLS.R, while makeFits_initial.R is the code to implement the same method but with given initial conditions for two parameters. The latter can be used to show the disadvantage of the existing approach. One can use the function makeFits.R to generate parametric birth seasonality estimates using either initialization.

Example of implementing the above methods for our data (provided as armenia) can be found in vignettes folder or https://kserkcho.github.io/SCEM/. Other functions in this repository are used internally in the above-mentioned functions.