Skip to contents

The residency matrix, J, holds information about residency for each human population stratum. It is the template for the time spent and time at risk matrices, making it possible to compute mosquito parameters describing blood feeding, the mixing matrix, and terms describing transmission.

Usage

create_residence_matrix(nPatches, residence)

Arguments

nPatches

the number of patches

residence

a vector describing the patch index for each habitat

Value

the residence matrix, denoted J where |J|=np×nh

Details

Information about residence in a patch location for each stratum is passed as the residence vector, an ordered list of patch locations. If the ith stratum lives in the jth patch, then Jj,i=1. Otherwise, Jj,i=0.

Since J is a matrix, it is readily used for computation. Let:

  • nh= nStrata, the number of population strata;

  • np= nPatches, the number of patches.

If w is any vector describing a quantity in strata (i.e., |w|=nh), then W=Jw is a vector that has summed w by residency for the strata, and |W|=np.