flag_anaemia_2: Anaemia Diagnosis

View source: R/utils.R

flag_anaemia_2R Documentation

Anaemia Diagnosis

Description

Perform anaemia diagnosis based on age, sex and pregnancy status

Usage

flag_anaemia_2(df, pop_group = NULL, hb = NULL, add = TRUE)

Arguments

df

Survey dataset (as an R data.frame) with the following variables present; sex, age, haemoglobin value, and pregnancy status. If the study sample population did not contain the pregnancy population, the pregnancy status (dummy variable yes/no) might not be required for this function. But, the other variables are compulsory for function processing. If the dataset did not contain those variables, please perform data processing to have those variables in the dataset.

pop_group

This variable contains information about the characteristic of observation required to identify the anaemia status. In anaemia diagnosis, Hb thresholds are different among different populations, such as age group, gender, and special condition (like pregnancy). Therefore, one variable can indicate the type of sample population characteristic requirement for anaemia diagnosis. The required population group for this variable is mentioned in the below table.

Population Valye
Children 6-59 months of age 1
Children 5-11 years of age 2
Children 12-14 years of age 3
Non-pregnant women (15 years and above) 4
Pregnant women 5
Men (15 years and above) 6

if the dataset did not include this variable yet, please create one before using this function. Sample r code for generating this variable is mentioned below using the sample dataset hbData.

df$pop_group <- with(df,ifelse( m.age >= 6 & m.age < 60, 1, ifelse( ch.age >= 5 & ch.age < 12, 2, ifelse( ch.age >= 12 & ch.age < 15, 3, ifelse( ch.age >= 15 & !is.na(ch.age) & sex == 2, 4, ifelse( group == "Pregnant Not Principal Carer" | group == "Pregnant and lactating Principal Carer" | group == "Pregnant Principal carer", 5, ifelse( ch.age >= 15 & !is.na(ch.age) & sex == 1, 6, NA)))))))

hb

Sample observation's haemoglobin level from the dataset. The Hb values should record in the grams per liter (g/L) units.

add

This parameter's default option is TRUE and will add new generated variables anaemia_all to your existing dataset applied in this function. This newly developed categorical variable comprises three types of flag categories resulting from data checking results; no anaemia, mild anaemia, moderate anaemia, and severe anaemia. The following table explains the cut-off points applied in this diagnostic function.

Population Mild Moderate Severe
Children 6-59 months of age 100 - 109 70 - 99 < 70
Children 5-11 years of age 110 - 114 80 - 109 < 80
Children 12-14 years of age 110 - 119 80 - 109 < 80
Non-pregnant women
(15 years and above) 110 - 119 80 - 109 < 80
Pregnant women 100 - 109 70 - 99 < 70
Men
(15 years and above) 110 - 129 80 - 109 < 80

Value

A data frame with the same structure as df is named anaemia. In this new data.frame, the new variable anaemia_all can be observed, containing the information which observation was affected by what type of anaemia: mild, moderate, or severe.


nutriverse/nutricheckr documentation built on April 1, 2022, 7:44 p.m.