flag_anaemia | R Documentation |
Perform anaemia diagnosis based on age, sex and pregnancy status
flag_anaemia( df, age = NULL, hb = NULL, sex = NULL, pregnant = NULL, add = TRUE )
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. | |||||||||||||||||||||||||||||||||||||
age |
Sample observation's age from the dataset. This variable should be recorded in the year format. If your dataset has only an age variable with month, please converts it into year format before using this function. | |||||||||||||||||||||||||||||||||||||
hb |
Sample observation's haemoglobin level from the dataset. The Hb values should record in the grams per liter (g/L) units. | |||||||||||||||||||||||||||||||||||||
sex |
Sample observation's sex identifies from the dataset. This
variable should be coded in the dummy variable as | |||||||||||||||||||||||||||||||||||||
pregnant |
Sample observation's pregnancy status from the dataset. This
variable should be coded as a dummy variable: | |||||||||||||||||||||||||||||||||||||
add |
This parameter's default option is TRUE and will add new
generated variables
|
A data frame with the same structure as df
. The new variable
anaemia_all
can be observed, containing the information the type of
anaemia present: mild, moderate, or severe.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.