Helper function for lumped population strata (proportional assignment)
Source:R/utils.R
strata_to_residency_proportion.Rd
If input is given as a vector of population sizes per-strata, lumped over patches, and a separate matrix whose columns describe how each strata is distributed over patches, this function calculates the residency matrix and population size for the overall stratification of both residency and strata.
Arguments
- H_strata
a vector of population size by strata
- J_strata
a matrix whose columns sum to one giving the distribution of strata (columns) populations over patches (rows)
Value
a list with three elements:
assignment_indices
: provides a mapping from patch (rows) and strata (columns) into the "unrolled" vectorH
J
: the residency matrix mapping elements inH
to patchesH
: the overall population distribution over strata and patches