make_stable_popn: Calculate an implied stable population

Description Usage Arguments Details Value See Also Examples

View source: R/make_stable_popn.R

Description

Calculation the stable (ie constant age structure) population implied by a given combination of total population size, life table Lx, age-specific fertility rates, and sex ratio.

Usage

1
2
3
4
5
6
7
8
9
make_stable_popn(
  popn_size,
  Lx,
  fert_rates,
  sex_ratio,
  time_start = NULL,
  time_end = NULL,
  growth_rate = FALSE
)

Arguments

popn_size

The total population size.

Lx

A Counts array with the life table Lx values.

fert_rates

Age-sex specific fertility rates

sex_ratio

The number of male births per 100 female births.

time_start

First time point. Optional.

time_end

Last time point. Optional.

growth_rate

If TRUE return the growth rate rather than population counts. Defaults to FALSE.

Details

Lx must be a Counts array with two dimensions. The dimensions must have dimtype "age" and "sex". The "age" dimension must have dimscale "Intervals".

If time_start and time_end arguments are supplied, a time dimension is added to the result.

Value

If growth_rate is FALSE (the default) a Counts object, with the same dimensions as Lx; otherwise, a number.

See Also

Lx_west, make_stationary_popn, make_tfr_fert_rates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Lx <- dembase::Counts(Lx_west[ , , "10"])
propn_age_fert <- dembase::Values(propn_age_fert_booth)
fert_rates <- make_tfr_fert_rates(tfr = 5,
                                  propn_age_fert = propn_age_fert,
                                  sex_ratio = 105)
make_stable_popn(popn_size = 100,
                 Lx = Lx,
                 sex_ratio = 105,
                 fert_rates = fert_rates)
x <- make_stable_popn(popn_size = 100,
                 Lx = Lx,
                 sex_ratio = 105,
                 fert_rates = fert_rates,
                 time_start = 2000,
                 time_end = 2025)
make_stable_popn(popn_size = 100,
                 Lx = Lx,
                 sex_ratio = 105,
                 fert_rates = fert_rates,
                 growth_rate = TRUE)

johnrbryant/agesim documentation built on Dec. 31, 2021, 11:56 a.m.