reweight_age_pyr: Re-weight age pyramid

View source: R/NetStats.R

reweight_age_pyrR Documentation

Re-weight age pyramid

Description

This function re-weights a given age pyramid (i.e., a vector with one element per year in an age range that specifies what proportion of the population should be that age) so that the desired fraction of the population falls below a specified age boundary.

Usage

reweight_age_pyr(age.pyramid, young.prop, age.break)

Arguments

age.pyramid

A vector of proportions.

young.prop

The weight that should be applied to the portion of age.pyramid that is below age.break

age.break

The index at which the upper group should begin.

Examples

unif.age.pyr <- rep(1/100, 100)
reweighted.age.pyr <- reweight_age_pyr(unif.age.pyr, 0.995, 65)


EpiModel/ARTnet documentation built on June 12, 2025, 4:23 p.m.