Description Usage Arguments Details Value Author(s)
Cleans ANC-RT data so that it can be used with other functions in the ANCRTAdjust
package.
1 | data_clean(data, total_age_cat = NULL)
|
data |
A country-specific ANC-RT database. The function check_data should have been run on the data to properly
prepare the data for use here.
The following variables (with these variable names) must be included in
|
total_age_cat |
The value of the |
This function has been developed to clean common issues associated with ANC-RT data. The following tasks are accomplished:
Age disaggregated data is removed (if applicable).
testneg_c
is set to n_status
- knownpos
- testpos
or n_status
- totpos
if testneg
is missing. testneg_c
is set to 0 if negative.
knownpos_c
is set to n_status
- testneg_c
- testpos
or totpos
- testpos
if knownpos
is missing. knownpos_c
is set to 0 if negative.
testpos_c
is set to n_status
- testneg_c
- knownpos_c
or totpos
- knownpos
if testpos
is missing. testpos_c
is set to 0 if negative.
n_status_c
is set to testpos_c
+ testneg_c
+ knownpos_c
when all of these variables are available. If either of the three variables is
missing, n_status_c
= n_status
.
totpos_c
is set to knownpos_c
+ testpos_c
if both of these variables are available. If either testpos_c
or knownpos_c
are
missing but totpos
is available, totpos_c
is set to totpos
. If totpos_c
is missing but n_status_c
and testneg_c
are available, totpos_c
= n_status_c
- testneg_c
.
The three suggested n_status_c
adjustments are created in the case that n_status_c
> n_clients
:
n_status_c_impute
uses the impute adjustment option
n_status_c_remove
uses the remove adjustment option
n_status_c_setmax
uses the set to maximum adjustment option
totpos_c
is adjusted if totpos_c
> n_status_c
:
totpos_c
: totpos_c
is set to missing when totpos_c
> n_status_c
totpos_c_impute
: totpos_c
is set to missing when totpos_c
> n_status_c_impute
totpos_c_remove
: totpos_c
is set to missing when totpos_c
> n_status_c_remove
totpos_c_setmax
: totpos_c
is set to missing when totpos_c
> n_status_c_setmax
The data is checked for duplicates (i.e. more than one observation exists with the same faciluid
and time
).
A cleaned ANC-RT database with additional variables:
testneg_c
: Cleaned testneg
(according to description)
testpos_c
: Cleaned testpos
(according to description)
knownpos_c
: Cleaned knownpos
(according to description)
n_status_c
: Cleaned n_status
(according to description)
n_status_c_impute
: Adjusted n_status_c
using the impute adjustment option for multiple testing
n_status_c_remove
: Adjusted n_status_c
using the remove adjustment option for multiple testing
n_status_c_setmax
: Adjusted n_status_c
using the set to maximum adjustment option for multiple testing
totpos_c
: Cleaned totpos
(according to description)
totpos_c_impute
: Adjusted totpos_c
if the impute adjustment option for multiple testing is used
totpos_c_remove
: Adjusted totpos_c
if the remove adjustment option for multiple testing is used
totpos_c_setmax
: Adjusted totpos_c
if the set to maximum adjustment option for multiple testing is used
Mathieu Maheu-Giroux
Brittany Blouin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.