create_survival_matrices: Create Survival Matrices for Selecting Instantaneous Hazard

View source: R/model_prep.R

create_survival_matricesR Documentation

Create Survival Matrices for Selecting Instantaneous Hazard

Description

Create empirical agetime hazard matrices for medical and traditional circumcision, as well as for censored (i.e. non-circumcised) and left-censored (i.e. age of circumcision unknown) individuals.

Usage

create_survival_matrices(
  out,
  areas = areas,
  area_lev = area_lev,
  time1 = "time1",
  time2 = "time2",
  age = "age",
  strat = "space",
  aggregated = TRUE,
  weight = "population",
  ...
)

Arguments

out

Shell dataset (outputted by create_shell_dataset with a row for every unique record in circumcision survey data for a given area. Also includes empirical estimates for circumcision estimates for each unique record.

areas

sf shapefiles for specific country/region.

area_lev

PSNU area level for specific country.

time1

Variable name for time of birth, Default: "time1"

time2

Variable name for time circumcised or censored, Default: "time2"

age
  • Variable with age circumcised or censored. Default: "age"

strat

Variable to stratify by in using a 3D hazard function, Default: NULL

aggregated

agggregated = FALSE treats every area_id as its own object, allowing for the use of surveys for lower area hierarchies. aggregated = TRUE means we only look at area level of interest.

weight

variable to weigh circumcisions by when aggregating for lower area hierarchies (only applicable for aggregated = TRUE)

...

Further arguments passed to or from other methods.

Value

list of length 4 of survival matrices for selecting instantaneous hazard rate.

See Also

create_shell_dataset create_hazard_matrix_agetime


mrc-ide/threemc documentation built on Feb. 9, 2024, 5:16 p.m.