For everything there is a season: Analysing periodic mortality patterns with the cyclomortr package
Abstract
- Many important demographic processes are seasonal, including survival. For many species, mortality risk is significantly higher at certain times of the year than at others, whether because resources are scarce, susceptibility to predators or disease is high, or both. Despite the importance of survival modelling in wildlife sciences, no tools are available to estimate the peak, duration and relative importance of these ‘seasons of mortality’.
- We present cyclomort, an r package that estimates the timing, duration and intensity of any number of mortality seasons with reliable confidence intervals. The package includes a model selection approach to determine the number of mortality seasons and to test whether seasons of mortality vary across discrete grouping factors.
- We illustrate the periodic hazard function model and workflow of cyclomort with simulated data. We then estimate mortality seasons of two caribou Rangifer tarandus populations that have strikingly different mortality patterns, including different numbers and timing of mortality peaks, and a marked change in one population over time.
- The cyclomort package was developed to estimate mortality seasons for wildlife, but the package can model any time‐to‐event processes with a periodic component.
I would want to tackle problems parametrically… I'm not keen on nonparametric formulations usually.– Sir David Cox (Reid, 1994)
1 INTRODUCTION
Understanding animal mortality (or survival) rates, and how those rates may change over time, is a central problem in population ecology. For an individual, mortality risk often varies markedly over the course of a year. Many species are more or less susceptible to death during particular seasonal life stages, for example, during migration (Giavi, Moretti, Bontadina, Zambelli, & Schaub, 2014; Klaassen et al., 2014; Rakhimberdiev, Hout, Brugge, Spaans, & Piersma, 2015) or gestation periods (Molinari‐Jobin, Molinari, Loison, Gaillard, & Breitenmoser, 2004; Owen‐Smith, 2008) or due to seasonal variation in predation intensity (Mattisson et al., 2016; Metz, Smith, Vucetich, Stahler, & Peterson, 2012). Similarly, human ailments and mortality risks often display a seasonal pattern, for example, increasing in colder or wetter months (Christodoulou et al., 2012; Fares, 2011; Nakaji et al., 2004).
The nonparametric Cox proportional hazards model is nearly ubiquitous in survival analyses for animal populations, because the effects of predictors can be estimated without regard for the baseline hazard function (Aalen, Borgan, & Gjessing, 2008). This ability to focus on the influence of covariates in a regression‐like framework explains the popularity of nonparametric approaches. However, an unintended consequence of the popularity of nonparametric models is that the underlying hazard itself has been ‘neglected’ (see Hjort, 1992; Royston & Parmar, 2002, and the epigraph from Cox himself). Exploring the basic structure of the underlying hazard with a parametric model has many advantages. Models can be parameterized with readily interpretable variables, and the temporal evolution of the hazard function can be helpfully visualized or contrasted (Royston & Parmar, 2002). Furthermore, from the perspective of an individual, the magnitude of the hazard itself is the most important variable (as noted by Cox in Reid, 1994), but this is not readily obtained from a proportional hazards type model.
The flexsurv package (Jackson, 2016) in r (R Core Team, 2017) provides an implementation of a general framework for parametric survival modelling (Royston & Parmar, 2002). For example, a fitted parametric hazard model (e.g. a Weibull function, or a spline‐basis) can ‘trace out’ how the virulence of a disease increases and then peters out. Similarly flexible is the implementation of kernel‐based hazard functions, for example, as implemented in the muhaz package (Hess & Gentleman, 2019), which can capture arbitrary (but data‐limited) shapes for a hazard function's evolution. However, neither of these packages allow estimation of mortality processes that recur with a fixed period. Despite the near ubiquity of seasonal signals in mortality risk in nature, there are, to the best of our knowledge, no published methods for estimating peak timing, duration and intensity of unknown mortality seasons.
Here, we introduce a multi‐modal periodic hazard model that underpins a likelihood‐based estimation of mortality seasons implemented in cyclomort, a new r package. cyclomort includes functions that return parametric fits from mortality data (i.e. start times of observation, times of death or censoring), as well as functions for summarizing, visualizing and comparing fitted periodic survival models, while staying consistent with the basic functionality of the commonly used survival package (Therneau, 2015). We illustrate the use of cyclomort with simulated data and with mortality data collected on two distinct groups of caribou Rangifer tarandus. Both populations live in strongly seasonal high latitude environments and feature strongly seasonal life histories, including relatively short annual parturition periods and, in one case, long‐distance migrations, which are reflected in highly structured seasonal mortality patterns.
2 MATERIALS AND METHODS
2.1 Periodic hazard function
We propose a flexible form for a periodic hazard function
, where τ is the period of the periodic function, h(t) is always non‐negative and
. The quantity
is the mean value of the hazard function, an important parameter that represents the average instantaneous rate of death.
(1)
(2)
. Examples of the multi‐seasonal periodic hazard function are illustrated in Figure 1.

In total, the periodic hazard model is specified by 3k parameters: a peak timing and duration of each of the k seasons, k − 1 unique weights and the overall mean hazard rate. Our principal goal is to estimate these parameters for right‐censored mortality data, such as might be obtained from individual observation or telemetry‐based studies.
2.2 Likelihood function


(3)Confidence intervals for the parameters are obtained from the Hessian of the likelihood at the maximum likelihood estimator. To obtain confidence intervals (CI's) around the hazard function itself, we sample from the asymptotic multivariate normal distribution of the maximum likelihood estimates (accounting for the possible covariance of those estimates), compute the hazard function for the sampled parameters many times (by default: 5,000) and return the empirical CI's at the desired confidence level from those generated hazard functions (Mandel, 2013). This approach is much faster than bootstrapping, which is in principle a viable option for computing CI's, since the model need not be fitted for each bootstrap resample. However, the Hessian‐based CI may occasionally lead to spurious results e.g. negative hazards, which we coerce to 0 or weights greater than 1, which we similarly coerce to 1.
Likelihood‐based model selection can be used to answer the question of how many seasons of mortality best explain the data. The null model (no peaks of mortality) has one parameter (the constant hazard h), whereas models with k > 0 seasons have 3k parameters (location and duration for each peak, relative contribution for k − 1 peaks and overall hazard). Comparisons can be made with AIC or, because these models are nested, with likelihood ratio tests.
2.3 Using cyclomort
The cyclomort package provides tools for the simulation, processing, visualization and fitting of periodic hazard survival processes.
2.3.1 Example with simulated data
By default, this function generates the plots in Figure 2, which illustrate the periodic hazard function (in this case, two peaks at 0.3 and 0.8 with season durations 0.15 and 0.20 and weights 0.6 and 0.4), the cumulative mortality and survival curves and a histogram of the simulated mortalities under the theoretical density function of mortality times. The simulated data are of the novel CycloSurv class, a subclass of the Surv style object used in survival and other packages that carries with it the periodicity of the data as an additional attribute. Note that the simulated data are not censored and all share the same start time of 0.

generates Figure 3.

It is important to note that the hazard function is not expected to be proportional to the distribution of seasonal mortalities. For example, the first and second hazard peak are relatively higher and lower, respectively, than the relative peaks in the mortality events. This is because the start time for all individuals was 0, and the overall population has already fallen significantly before the second mortality season takes noticeable effect. To illustrate this particular potential bias of looking only at mortality event distributions, we fitted a naive bimodal Gaussian mixture model with mixtools (Benaglia, Chauveau, Hunter, & Young, 2009), which yielded relative estimated weights of 0.72 and 0.28, compared to the true weights of 0.6 and 0.4.
We further compared the cyclomort fit to 8‐ and 16‐knot splines using flexsurv (Figure 4). Visually, these fits fail to capture the shape of the hazard after several periods. AIC can be used to compare these fits quantitatively: the 8‐ and 16‐knot spline AICs are 486.8 and 459.3, much higher than the cyclomort AIC of 448.8. This is due, in part, to the higher parameter cost (9 and 17, respectively, compared to the six parameters of a two‐peak periodic hazard). Note also that the flexsurv fits do not provide ready answers for the timing of shape of those peaks.

2.3.2 Factorial analysis

This is not surprising, since the Cox proportional hazards model explicitly (and famously) assumes that the baseline hazard is identical. Note that in this case we fitted models with a single seasonal peak. The actual number of seasons to fit should be guided with model selection tools, as illustrated in the case studies below.
2.4 Case studies
We demonstrate the application of the cyclomort package on two mortality datasets collected on wild caribou: a non‐migratory boreal woodland caribou (Rangifer tarandus caribou) population in the Northwest Territories (NWT) in Canada, and a migratory tundra caribou (Rangifer tarandus granti) population in western Alaska (WAH). We conduct two superficial analyses: (a) estimating the number, timing, duration and intensity of mortality seasons in the NWT population and (b) quantifying the change in mortality across years in the WAH population.
In both the NWT and WAH studies, adult female animals were collared at study‐specific times of year that are convenient for capturing animals. Collars that stopped moving before pre‐programmed drop‐off dates were recovered in the field, and mortality events were distinguished uniquely from occasional collar losses. Final mortality data contain columns for the start time of collar deployment, the end time of collar functioning, and the fate of the organism, either dead or censored. The collected mortality data appear as horizontal bars of deployment in Figure 6, and are included in subsetted and anonymized forms in the package itself as, respectively, nwt_morts and wah_morts.

2.4.1 How many seasons? NWT boreal caribou
For these data, the three‐season model has the lowest AIC by a margin of at least 8.5 compared to competing models (Figure 7a). Furthermore, nested likelihood ratio tests indicate significant improvement of three relative to two seasons (lrt = 25.25, df = 3, p = .0003), but no significant improvement of four over three seasons (lrt = 2.47, df = 3, p = .98). The three distinct mortality peaks (Table 1) occur on 21 April (standard error 2.2 days), 13 July (SE = 2.5) 8 and November (SE = 13.9), respectively, with a fairly equal distribution of mortality across the peaks (30%, 40%, and 30%, respectively). The biggest difference is in the season duration, as the spring and summer mortality seasons are somewhat less than 1 month long, while the fall mortality season is several months long. Note that while the timing of the peaks and the overall mean hazard rate are estimated with high precision (coefficients of variation below 5%), confidence intervals on the durations are much wider. Visually, the estimated hazard echoes the distribution of mortalities within the year (Figure 7b). This analysis provides strong support for the assertion that a three‐season model is a useful description of the mortality hazard for this population of caribou.

| Parameter | Season 1 | Season 2 | Season 3 | |||
|---|---|---|---|---|---|---|
| Estimate | (95% CI) | Estimate | (95% CI) | Estimate | (95% CI) | |
| Peak | Apr 21 | (Apr 170–Apr 26) | Jul 13 | (Jul 8–Jul 18) | Nov 8 | (Oct 11–Dec 6) |
| Duration (days) | 17.74 | (10.3–29.7) | 23.58 | (12.5–42.2) | 71.07 | (26.7–129) |
| Weight | 0.30 | (0.2–0.4) | 0.40 | (0.2–0.6) | 0.30 | (0.1–0.5) |
| Mean hazard rate (year−1) | 0.17 | (0.16 – 0.19) | — | — | — | — |
2.4.2 Did mortality change? Western Arctic Herd tundra caribou
Migratory tundra caribou Rangifer tarandus granti of the Western Arctic Herd resides in north‐western Alaska (Figure 6c). They calve in early June north of the Brooks Range in Arctic tundra, spend their summers in the tundra and in the mountains, typically migrate south to overwinter in sub‐Arctic tundra and boreal forest and then migrate north in spring to their calving grounds (Cameron, Joly, Breed, Parrett, & Kielland, 2018). One hundred and seventy‐one GPS collars were deployed on caribou on their fall migration as they swam across the Kobuk River from 2009 to 2017 (Joly, Miller, & Shults, 2012).
Data for the Western Arctic Herd were collected between 2009 and 2018, with collaring occurring in September. Mortality peaks occur in October and late spring (roughly during the fall and spring migrations). However, mortality rates were apparently much higher in winter 2017–spring 2018 (Figure 8a), with 27 mortalities in the 1 year period September 2017–2018, compared to 64 in the 7 year period September 2010–2017, though that difference also reflects a more intensive collaring effort in later years.

We broke the data into two groups at 1 September 2017, such that animals that were collared earlier and still active on that date were censored from the first group and entered the study on that date in the second group. We then quantified and compared the seasonal patterns and intensity of mortality before and after the cut‐off date.
For both periods, the AIC values of fitted 0, 1 and 2 season models were all within 2, and much lower than the three‐season model ( ΔAIC > 4.5). Any of those models had reasonable statistical support, but we were interested in the ecologically relevant seasonality of mortality and therefore fitted two‐season models for both groups (Figure 8b, Table 2).
| Pre‐Sep 2017 | Post‐Sep 2017 | |||
|---|---|---|---|---|
| Spring | Fall | Spring | Fall | |
| Mean hazard rate (year−1) | 0.18 (0.13 – 0.23) | 0.41 (0.30 – 0.52) | ||
| Peak (day of year): | Jun 2 (Apr 29–Jul 6) | Oct 7 (Sep 8–Nov 6) | Mar 24 (Jan 15–May 30) | Nov 14 (Nov 5–Nov 24) |
| Duration (day) | 102 (48–149) | 49 (9–133) | 111 (42–161) | 17.4 (2.6–82) |
| Weight | 0.75 (0.3–1) | 0.25 (0–0.6) | 0.74 (0.3–1) | 0.26 (0–0.60) |
The parameter estimates (Table 2) and estimated hazard functions (Figure 8) indicate a hazard rate that was twice as high in 2017–2018 as in previous years (0.40 vs. 0.18) with non‐overlapping confidence intervals. Furthermore, the estimated peaks of the two seasons differed significantly, with the peak of fall mortality occurring over a month later in 2017–2018 (November 14 vs. October 7), and with a shorter season (17 days vs. 49 days). In contrast, spring mortality peaked considerably earlier in 2018 (March 24 vs. June 2), though with high overlap in the confidence intervals. The spring mortality seasons were also much longer duration (110 and 102 days post‐ and pre‐2017 respectively). In both cases about 75% of the mortality was attributed to the longer, but less intense, spring season.
3 DISCUSSION
The cyclomort package facilitates a narrow, but widely relevant analysis: the detection of and quantification of seasonal variation in an underlying hazard from right‐censored survival data. The statistical methodology and r package were developed for survival analyses of relatively long‐lived wildlife, which are often captured and instrumented at specific times of year and survive multiple seasonal pulses of mortality risk. The parametric approach has many benefits, including interpretable parameters and ready visualization (Royston & Parmar, 2002). While parametric models may involve some strong assumptions regarding the functional form of a process, the wrapped Cauchy formulation is generic and flexible, and the various tools of model selection and visualization help protect against over‐fitting. Running any censored survival dataset through cyclomort can sharpen the relevant questions that ecologists might be interested in. For example, explaining the three seasons of boreal woodland caribou mortality and the causes behind the higher and shifted mortality of the WAH herd in 2017–2018 are of great management interest.
Existing tools for survival analysis cannot estimate seasonal or multi‐seasonal baseline hazards without strong a priori assumptions or high parametric cost. Typical characterization of seasonal mortalities relies on, for example, using month as a covariate (McLoughlin, Dzus, Wynes, & Boutin, 2003; Owen‐Smith, 2008), or analysing against pre‐defined seasons (Mattisson et al., 2016; Metz et al., 2012). Alternatively, hazard‐based analyses use complex splines. For example, in a useful and influential review of wildlife survival modelling, Heisey and Patterson (2006) used a 17 knot spline to characterize the seasonal shape of coyote survival, yielding an idiosyncratic curve with wide confidence intervals. Similarly, Kelly et al. (in prep.), analysed the NWT woodland caribou by directly estimating survival across 5 days moving windows and fitting an 8 knot wrapped GAM, yielding characteristic curves similar to those provided by cyclomort. These approaches can provide a nuanced and accurate characterization of the seasonal hazard, with somewhat greater flexibility than cyclomort, which assumes symmetrical hazard seasons in time. However, they require some a priori decisions, for example, on the number of knots, and post‐hoc analysis, for example, to ‘extract’ peaks and season durations. The parametrization and model selection tools in cyclomort obviate the need for both of these.
In a recent comprehensive review of r packages for the estimation of hazard rates, Hagar and Dukic (2015) propose several criteria for comparing tools. These include statistical measures (e.g. accuracy and precision of hazard estimation and covariate analysis), but also measures of ‘user‐friendliness’, including compatibility with r's Surv survival data type, formula type specifications, plot, summary and print methods, and quality of documentation. In its current iteration, cyclomort provides precise and accurate estimates of the underlying hazard function. It is admittedly weak on the analysis of covariates, as it can only test an alternative hypothesis where all parameters change. Future refinements should include the ability to specify the parameters which might change across covariates. This would facilitate answering more refined questions, such as is it the overall hazard or the seasonal pattern that is different among groups? We have, however, placed considerable focus on the second set of criteria, making cyclomort as user‐friendly as possible, with ample documentation, summary and plotting methods for fitted model results, easily used functions, and straightforward to interpret results. We hope these features will make cyclomort a useful addition to the ever‐growing arsenal of survival modelling tools in r.
ACKNOWLEDGEMENTS
We thank NWT First Nations partners for their support of mortality studies on boreal caribou: Sambaa K'e Dene Band (Trout Lake), Fort Simpson Métis Local, The Denendeh Harvesters Committee of Líídlíí Kue First Nation (Fort Simpson), Jean Marie River First Nation, Pehdzeh Ki First Nation (Wrigley), Nahanni Butte Dene Band, Acho Dene Koe Band (Fort Liard), Deh Gah Got'ie First Nation (Fort Providence), Fort Providence Métis Council, Ka'a'gee Tu First Nation (Kakisa), West Point First Nation (Hay River), K'atl'odeeche First Nation (Hay River Reserve), Deninu K'ue First Nation (Fort Resolution) and the Northwest Territory Métis Nation. The late Danny Allaire is acknowledged for providing censor data for many boreal caribou. We thank the Alaska Department of Fish and Game for their critical partnership with WAH caribou captures, management and research. Funding for E.G. was provided by the National Park Service and by NASA ABoVE Animals on the Move grants (NNX15AU20A and NNX15AW71A). Contributions by W.F.F. were supported by NSF ABI 1458748. All authors declare no conflict of interest.
AUTHORS' CONTRIBUTIONS
E.G. and A.P.K. developed the concept. E.G. and P.T. developed the theory and r package. A.P.K., N.C.L. and K.J. collected and compiled the data. All authors contributed to the writing and final drafts.
Open Research
DATA AVAILABILITY STATEMENT
The cyclomort package and documentation are hosted on GitHub at https://github.com/EliGurarie/cyclomort/ and released on Zenodo at https://zenodo.org/badge/latestdoi/169632268. More examples of coding and analysis are available in the accompanying vignette, accessed by entering vignette("cyclomort") in an r console.
The r package includes two datasets: wah_morts and nwt_morts. The first includes 90 of 171 mortality events from the western Arctic herd. The latter includes all of the Northwest Territories mortalities; however, the year of tagging is randomized thereby conserving the seasonal patterns and guaranteeing replicability of the analysis (examples provided in the vignette). The complete field‐derived mortality datasets are not publicly available in their raw form due to legal constraints imposed by respective wildlife management agencies, though case by case inquiries regarding the raw data can be addressed to co‐authors K.J. (email: kyle.joly@nps.gov) or A.P.K. (allicia_kelly@gov.nt.ca).
REFERENCES
Citing Literature
Number of times cited according to CrossRef: 2
- Mark Hebblewhite, Jesse Whittington, Wolves without borders: Transboundary survival of wolves in Banff National Park over three decades, Global Ecology and Conservation, 10.1016/j.gecco.2020.e01293, (e01293), (2020).
- Timothy J. Fullman, Ryan R. Wilson, Kyle Joly, David D. Gustine, Paul Leonard, Wendy M. Loya, Mapping potential effects of proposed roads on migratory connectivity for a highly mobile herbivore using circuit theory, Ecological Applications, 10.1002/eap.2207, 0, 0, (2020).














