Log-linear interpolation of age/sex stratified population

interpolate_population_agesex(population_agesex, calendar_quarters)

Arguments

population_agesex

a subset of the population_agesex.

calendar_quarters

vector of calendar quarters to return interpolation.

Value

A data.frame with same columns as pop_agesex interpolated to times.

Details

zoo::na.approx() is used to interpolate log(population).

Examples

## Interpolate Malawi population at level 2 (Zone) at two time points
data(demo_population_agesex)
calendar_quarters <- c("CY2016Q1", "CY2018Q3")
pop_interp <- interpolate_population_agesex(demo_population_agesex, calendar_quarters)