Here we take the survival rates for females and males and the sex ratio, as well as the annual new cohort size (assumed constant), and we make a leslie-like matrix to compute the stable age distribution.

leslie_from_spip(P, C, growth_rates = NULL, T = NA)

Arguments

P

a named list of the spip parameters.

C

the constant size of the newborn cohort each year

growth_rates

If not NULL, a vector of desired growth rates. For each one of these the function will return a leslie matrix, the stable age distribution, the initial number of males and females at that age distribution, and also the cohort sizes until time T (if T is not NA)

T

the number of years to compute the cohort sizes for in the growing (or shrinking) populations.

Value

This function returns a list with the following components:

  • stable_age_distro_fem: a vector of the expected number of females in each age group of 0 up to MaxAge-1 once the stable age distribution has been reached. Note that this corresponds to the PREKILL_CENSUS from spip. In this vector, the size of the MaxAge group is left out because this is how it is needed to be to insert into the --initial-males and --initial-females options in spip(). If you want the size of all age classes, use the output list component stable_age_distro_fem_with_max_age_class, described below.

  • stable_age_distro_male: same as above, but for males.

  • stable_age_distro_fem_with_max_age_class: The expected number of females from age 0 to MaxAge once the stable age distribution has been reached.

  • stable_age_distro_male_with_max_age_class: same as above, but for females.

  • female_leslie_matrix: The Leslie matrix implied by the spip parameters in P.

Details

For growing or shrinking populations, this is currently correct only when the male and female survival rates are the same, and hence the stable age distributions of the two sexes are the same as well.

Examples

result <- leslie_from_spip(species_1_life_history, 300)

# print the result list:
result2 <- leslie_from_spip(
  species_1_life_history,
  300,
  growth_rates = c(-.02, 0, 0.04),
  T = 60
 )

# With several growth rates, including 0.