summarize_survival_from_census {CKMRpop}R Documentation

Summarize annual sex-and-age-specific survival rates from the census information

Description

The prekill census in year t+1 is the post-kill census in year t, so we can use the prekill census to record the realized fraction of individuals of each age and sex that survived the death episode in each year. In the output survival in year t is the fraction of j-year olds in year t that survive to be j+1 year-olds in year t+1.

Usage

summarize_survival_from_census(
  census,
  fem_surv_probs = NULL,
  male_surv_probs = NULL,
  nbins = 10
)

Arguments

census

a tibble of census counts with columns year and age, and then the counts of the different sexes in columns named male, and female.

fem_surv_probs

a vector of the parameters used for the simulation. If present these are put on the histogram plots. If you provide one of these, you have to provide both.

male_surv_probs

a vector of the parameters used for the simulation. If present these are put on the histogram plots.

nbins

number of bins for the histograms

Details

This function does not track migrants. Another one is eventually in order that accounts for migrants out of the population. Also, the plots here might not play well with multiple populations.

Value

A list with components:

Examples

result <- summarize_survival_from_census(
  species_1_slurped_results$census_prekill,
  species_1_life_history$`fem-surv-probs`,
  species_1_life_history$`male-surv-probs`
)

# print the results if you want
result$survival_tibble
result$plot_histos_by_age_and_sex


[Package CKMRpop version 0.1.3 Index]