Skip to contents

Project population by age and sex using the cohort-component method.

Usage

proj_pop_scene(pop_s, qx_male, qx_female, asfr, srb, pop_m = NULL)

Arguments

pop_s

Scenario-year list of baseline population structures.

qx_male

Scenario-year list of male death probabilities by age.

qx_female

Scenario-year list of female death probabilities by age.

asfr

Scenario-year list of age-specific fertility vectors.

srb

Scenario list of sex ratio at birth vectors.

pop_m

Optional scenario-year list of net migration structures.

Value

A scenario-year list of data frames. Each year-level data frame keeps age-specific male/female population and male/female deaths.

Examples

data("infile_pop", package = "fastproj")
data("inparm_scene", package = "fastproj")
if (requireNamespace("DemoTools", quietly = TRUE)) {
  inparm_lt <- mod_lx(0.00318, 76.75, 0.00264, 82.22)
  lx_m <- fastproj:::proj_lx_scene(inparm_lt, inparm_scene, sex = "male")
  lx_f <- fastproj:::proj_lx_scene(inparm_lt, inparm_scene, sex = "female")
  qx_m <- fastproj:::base_lx2qx_scene(lx_m)
  qx_f <- fastproj:::base_lx2qx_scene(lx_f)
  asfr <- fastproj:::proj_asfr_scene(infile_pop, inparm_scene)
  srb <- proj_param_scene(inparm_scene, type = "srb")
  pop0 <- fastproj:::proj_pop_baseline_scene(infile_pop, project_year = nrow(inparm_scene[[1]]))
  pop1 <- proj_pop_scene(pop0, qx_m, qx_f, asfr, srb)
  dim(pop1[[1]][[1]])
}
#> [1] 101   5