Learn R Programming

vacalibration (version 2.0)

cause_map: Broad Cause Mapping

Description

Maps individual-level specific (high resolution) cause of death (codEAVA() function in EAVA and crossVA() function in openVA) to broad causes.

Usage

cause_map(df, age_group)

Value

Matrix. Rows are individuals. Columns are broad causes. This is a binary matrix (entries 0 or 1) with 1 indicating the broad cause of death for the individual.

Arguments

df

Data frame. Outputs from crossVA() function in openVA for EAVA and crossVA() function in openVA for InSilicoVA and InterVA

age_group

Character. The age group of interest. "neonate" for deaths between 0-27 days, and "child" for 1-59 months.

Examples

Run this code

## COMSA-Mozambique Publicly Available Version
## Example Individual-Level Specific (High-Resolution) Cause of Death Data
data(comsamoz_public_openVAout)
head(comsamoz_public_openVAout$data)  # head of the data
comsamoz_public_openVAout$data[1,]  # ID and specific cause of death for individual 1

## mapped to broad cause
## same as comsamoz_public_broad$data
comsamoz_public_asbroad = cause_map(df = comsamoz_public_openVAout$data, age_group = "neonate")
head(comsamoz_public_asbroad)

### store broad cause map of the data
data(comsamoz_public_broad)
head(comsamoz_public_broad$data) # identical to head(comsamoz_public_asbroad)

Run the code above in your browser using DataLab