Classification functions that support the main functions for working with MUAC datasets
Source:R/muac_classification.R
ipc_muac_class.Rd
Classification functions that support the main functions for working with MUAC datasets
Usage
classify_age_ratio(p)
classify_sex_ratio(p)
classify_sd(std_dev)
classify_quality(age_ratio_class, sex_ratio_class, std_dev_class, dps_class)
classify_acute_malnutrition(
muac,
muac_units = c("mm", "cm"),
oedema,
oedema_recode = NULL
)
Arguments
- p
Numeric value for p-value of a statistical test used in the various checks applied.
- std_dev
Numeric value for standard deviation (SD) of a measurement usually MUAC.
- age_ratio_class
A character value or vector for classification based on the result of the age ratio test.
- sex_ratio_class
A character value or vector for classification based on the sex ratio test.
- std_dev_class
A character value for vector for classification based on standard deviation.
- dps_class
A character value for vector for classification based on the digit preference score (DPS)
- muac
A numeric value or vector of numeric values for MUAC measurement of child. The expected values for MUAC are in millimetres. If units are different, use
muac_units
to specify which units are used.- muac_units
A character value for units used for MUAC measurement. Currently accepts either "mm" for millimetres (default) or "cm" for centimetres.
- oedema
A value or a vector of values for oedema status of child. The expected values for
oedema
is 1 = for presence of oedema and 2 for no oedema. If data values are different, useoedema_recode
to map out the values to what is required.- oedema_recode
A vector of values with length of 2 with the first element for the value signifying presence of oedema and second element for the value signifying no oedema in the dataset. For example, if "y" is the value for presence of oedema and "n" is the value for no oedema, then specify
c("y", "n)
. If set to NULL (default), then the values c(1, 0) are used.
Examples
age_ratio_p <- nipnTK::ageRatioTest(as.integer(!is.na(muac_data$age)))$p
classify_age_ratio(age_ratio_p)
#> [1] "Problematic"