multiply.contact.array.from: Multiply a transmission contact array by rates for the 'from'...

View source: R/transmission.R

multiply.contact.array.fromR Documentation

Multiply a transmission contact array by rates for the 'from' population

Description

Fundamentally, a contact array can be thought of as taking the outer product of a 'from array' with a 'to array'. This function equates to multiplying the from array portion prior to taking the outer product with the to array portion

Usage

multiply.contact.array.from(jheem, contact.array, from.multiplier)

Arguments

jheem

An object of jheem-class

contact.array

A contact array, with dimensions: [age.from, race.from, subpopulation.from, sex.from, risk.from, age.to, race.to, subpopulation.to, sex.to, risk.to, non.hiv.subset.to]

from.multiplier

An array with dimensions matching the general population: [age, race, subpopulation, sex, risk]

Details

A new infection proportions array should have dimensions [age, race, subpopulation, sex, risk, non.hiv.subset, continuum, cd4, hiv.subset]. For each combination of age x race x subpopulation x sex x risk x non.hiv.subset, proportions[age,race,subpopulation,sex,risk,non.hiv.subset,,,] should sum to 1 and represent the proportions according to which new infections from the age x race x subpopulation x sex x risk x non.hiv.subset are distributed across strata of continuum x cd4 x hiv.subset

See Also

Other functions for transmission contact arrays: create.contact.array.from.marginals(), get.contact.array.skeleton(), multiply.contact.array.to(), set.transmission.contact.array()


tfojo1/jheem documentation built on Oct. 7, 2022, 1:24 p.m.