View source: R/population_growth.R
create.birth.proportions.hiv.negative | R Documentation |
Create a valid Birth Proportions array for births to HIV-negative parents
create.birth.proportions.hiv.negative( jheem, ..., subpopulation.same.as.parents = F, risk.same.as.parents = F, non.hiv.subset.same.as.parents = F, subpopulations.born.into.state = NULL, sex.born.into.state = NULL, risk.born.into.state = NULL, non.hiv.subset.born.into.state = NULL )
jheem |
A instance of a JHEEM |
subpopulation.same.as.parents |
Boolean values indicating whether births from each of these dimensions should be into the same state as the parents |
risk.same.as.parents |
Boolean values indicating whether births from each of these dimensions should be into the same state as the parents |
non.hiv.subset.same.as.parents |
Boolean values indicating whether births from each of these dimensions should be into the same state as the parents |
subpopulations.born.into.state |
The name or index of the state within each dimension into which all new births should go. A value of NULL indicates that births into a specific state should not be used for the dimension |
sex.born.into.state |
The name or index of the state within each dimension into which all new births should go. A value of NULL indicates that births into a specific state should not be used for the dimension |
risk.born.into.state |
The name or index of the state within each dimension into which all new births should go. A value of NULL indicates that births into a specific state should not be used for the dimension |
non.hiv.subset.born.into.state |
The name or index of the state within each dimension into which all new births should go. A value of NULL indicates that births into a specific state should not be used for the dimension |
A full birth proportions array will have a set of '.from' dimensions (representing the demographics of parents) and '.to' dimensions (representing the demographics of newborns). While the full set of '.to' dimensions must be specified for a valid birth proportions array, any or all of the '.from' dimensions may be omitted (in which case, the birth proportions will be assumed to be the same for the omitted dimensions). Specifically:
Births to HIV-negative parents must have a subset of [age.from, race.from, subpopulation.from, sex.from, risk.from, non.hiv.subset.from] and all of [subpopulation.to, sex.to, risk.to, non.hiv.subset.to]
Uninfected births to HIV-positive parents must have a subset of [age.from, race.from, subpopulation.from, sex.from, risk.from, continuum.from, cd4.from, hiv.subset.from] and all of [subpopulation.to, sex.to, risk.to, non.hiv.subset.to]
Infected births to HIV-positive parents must have a subset of [age.from, race.from, subpopulation.from, sex.from, risk.from, continuum.from, cd4.from, hiv.subset.from] and all of [subpopulation.to, sex.to, risk.to, continuum.to, cd4.to, hiv.subset.to]
(There is no age.to because all births are into the first age stratum, and there is no race.to because it is assumed all newborns will be of the same race as their parents) The create.birth.proportions functions are convenience functions used to easily construct valid birth proportions arrays from minimal information. They require the user to specify how each of the '.to' dimensions will be constructed in the birth proportions array. The form of each '.to' dimension may be specified by one of:
An explicit array passed as one of the ... arguments. These arrays can have any combination of the requisite '.from' and '.to' dimensions (the functions will assume that if two dimensions corresponding to, say, sex, are present, the first is the .from and the second is the .to. If only one is present, it is assumed to be the .to)
An indication that newborns go into the same dimension as their parents. Eg, subpopulation.to.same.as.parents=T means that subpopulation.to wil equal subpopulation.from (unless otherwise specified by one of the explicitly passed arrays)
An indication of which state from the dimension all newborns go into. Eg, subpopulation.to.state=1 would indicate that all newborns go into the first subpopulation state
If a dimension only has one state (eg, just one subpopulation) then no specification is needed
The arguments must specify using one of these means for each of the needed .to dimensions.
Other functions to create birth proportions arrays:
create.birth.proportions.from.population()
,
create.birth.proportions.hiv.positive.to.negative()
,
create.birth.proportions.hiv.positive.to.positive()
,
get.birth.proportions.to.hiv.negative.skeleton()
Other functions to specify births in the population:
create.birth.proportions.from.population()
,
create.birth.proportions.hiv.positive.to.negative()
,
create.birth.proportions.hiv.positive.to.positive()
,
get.birth.proportions.to.hiv.negative.skeleton()
,
set.birth.proportions.hiv.negative()
,
set.birth.proportions.hiv.positive()
,
set.birth.proportions.no.maternal.transmission()
,
set.fertility.hiv.negative()
,
set.fertility.hiv.positive()
,
set.fertility()
,
set.immigration.proportions()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.