Title: | Verbal Autopsy Data Transformation for InSilicoVA and InterVA5 Algorithms |
---|---|
Description: | Enables transformation of Verbal Autopsy data collected with the WHO 2016 questionnaire (versions 1.4.1 & 1.5.1) or the WHO 2014 questionnaire for automated coding of Cause of Death using the InSilicoVA (data.type = "WHO2016") and InterVA5 algorithms. Previous versions of this package supported user-supplied mappings (via the map_records function), but this functionality has been removed. This package is made available by WHO and the Bloomberg Data for Health Initiative. |
Authors: | Jason Thomas [aut, cre], Eungang Choi [aut], Zehang Li [aut], Nicolas Maire [aut], Tyler McCormick [aut], Peter Byass [aut], Sam Clark [aut] |
Maintainer: | Jason Thomas <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2025-01-24 03:59:18 UTC |
Source: | https://github.com/cran/CrossVA |
odk2openVA
transforms data collected with the 2016 WHO VA instrument
or the 2014 WHO VA instrument into a format that can be used with the
InterVA5 and InSilicoVA alogrithms for coding cause of death. It is a
wrapper for functions that handle specific versions of the 2016 WHO VA
instrument – namely, 1.4.1 and 1.5.1 – as well as the 2014 WHO VA
instrument. Note: versions 1.5.2 and 1.5.2 do not include changes that
require modification for the data preparation, so the code for version
1.5.1 should also work for these later two versions.
odk2openVA(odk, id_col = "meta.instanceID")
odk2openVA(odk, id_col = "meta.instanceID")
odk |
A dataframe, obtained from reading an ODK Briefcase export of records collected with the WHO questionnaire. |
id_col |
A character string of the column name (in odk) with the unique ID for each death. |
This is a wrapper function that tries to determint the type of WHO VA instrument used to collect the data. If the input (i.e., the odk export) includes a column containing the string "ID1A110" (or "id1a110"), then this function assumes the data were collected using the 2014 WHO VA instrument. If the input (i.e., the odk export) contains the string "age_neonate_hours" and does not contain the string "ID1A110" (or "id1a110"), then the function assumes the questionnaire version is 1.4.1 from the 2016 instrument. If neither condition is met, then the function assumes the data were collected with version 1.5.1 of the 2016 WHO VA instrument. Note: versions 1.5.2 and 1.5.2 do not include changes that require modification for the data preparation, so the code for version 1.5.1 should also work for these later two versions.
By default, this function assumes the data column named 'meta.instanceID' contains the unique ID for each record. If this column is not found, then the ID is set to 1:nrow(odk). Alternatively, the user may specify the column name containing the ID by passing a string to the id_col parameter.
## Example with 2016 WHO VA instrument version 1.5.1 record_f_name151 <- system.file("sample", "who151_odk_export.csv", package = "CrossVA") records151 <- read.csv(record_f_name151, stringsAsFactors = FALSE) output151 <- odk2openVA(records151) ## Example with 2016 WHO VA instrument version 1.4.1 record_f_name141 <- system.file("sample", "who141_odk_export.csv", package = "CrossVA") records141 <- read.csv(record_f_name141, stringsAsFactors = FALSE) output141 <- odk2openVA(records141)
## Example with 2016 WHO VA instrument version 1.5.1 record_f_name151 <- system.file("sample", "who151_odk_export.csv", package = "CrossVA") records151 <- read.csv(record_f_name151, stringsAsFactors = FALSE) output151 <- odk2openVA(records151) ## Example with 2016 WHO VA instrument version 1.4.1 record_f_name141 <- system.file("sample", "who141_odk_export.csv", package = "CrossVA") records141 <- read.csv(record_f_name141, stringsAsFactors = FALSE) output141 <- odk2openVA(records141)
odk2openVA_2014
transforms data collected with the 2014 WHO VA instrument
(form id: va_who_2014_final10) to serve as the input to the InterVA5 and
InSilicoVA alogrithms for coding cause of death.
odk2openVA_2014(odk, id_col = "meta.instanceID")
odk2openVA_2014(odk, id_col = "meta.instanceID")
odk |
A dataframe, obtained from reading an ODK Briefcase export of records collected with the WHO questionnaire. |
id_col |
A character string of the column name (in odk) with the unique ID for each death. |
## Not run: record_f_name <- system.file("sample", "who2014_odk_export.csv", package = "CrossVA") records <- read.csv(record_f_name, stringsAsFactors = FALSE) output <- odk2openVA_2014(records) ## End(Not run)
## Not run: record_f_name <- system.file("sample", "who2014_odk_export.csv", package = "CrossVA") records <- read.csv(record_f_name, stringsAsFactors = FALSE) output <- odk2openVA_2014(records) ## End(Not run)
odk2openVA
transforms data collected with the 2016 WHO VA instrument
(version 1.4.1) to serve as the input to the InterVA5 and InSilicoVA
alogrithms for coding cause of death.
odk2openVA_v141(odk, id_col = "meta.instanceID")
odk2openVA_v141(odk, id_col = "meta.instanceID")
odk |
A dataframe, obtained from reading an ODK Briefcase export of records collected with the WHO questionnaire. |
id_col |
A character string of the column name (in odk) with the unique ID for each death. |
## Not run: record_f_name <- system.file("sample", "who141_odk_export.csv", package = "CrossVA") records <- read.csv(record_f_name, stringsAsFactors = FALSE) output <- odk2openVA_v141(records) ## End(Not run)
## Not run: record_f_name <- system.file("sample", "who141_odk_export.csv", package = "CrossVA") records <- read.csv(record_f_name, stringsAsFactors = FALSE) output <- odk2openVA_v141(records) ## End(Not run)
odk2openVA_v151
transforms data collected with the 2016 WHO VA
instrument (version 1.5.1) to serve as the input for the InterVA5
and InSilicoVA alogrithms for coding cause of death. Note: versions
1.5.2 and 1.5.2 do not include changes that require modification for
the data preparation, so the code for version 1.5.1 should also work
for these later two versions.
odk2openVA_v151(odk, id_col = "meta.instanceID")
odk2openVA_v151(odk, id_col = "meta.instanceID")
odk |
A dataframe, obtained from reading an ODK Briefcase export of records collected with the WHO questionnaire. |
id_col |
A character string of the column name (in odk) with the unique ID for each death. |
## Not run: record_f_name <- system.file("sample", "who151_odk_export.csv", package = "CrossVA") records <- read.csv(record_f_name, stringsAsFactors = FALSE) output <- odk2openVA_v151(records) ## End(Not run)
## Not run: record_f_name <- system.file("sample", "who151_odk_export.csv", package = "CrossVA") records <- read.csv(record_f_name, stringsAsFactors = FALSE) output <- odk2openVA_v151(records) ## End(Not run)