Anthroplus
Anthroplus
URL https://github.com/WorldHealthOrganization/anthroplus
BugReports https://github.com/WorldHealthOrganization/anthroplus/issues
NeedsCompilation no
Author Dirk Schumacher [aut, cre],
Elaine Borghi [ctb],
Giovanna Gatica-Domínguez [ctb],
World Health Organization [cph]
Maintainer Dirk Schumacher <[email protected]>
Repository CRAN
Date/Publication 2024-11-11 12:30:02 UTC
1
2 anthroplus_prevalence
Contents
anthroplus_prevalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
anthroplus_zscores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Survey_WHO2007 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Index 7
Description
Prevalence estimates according to the WHO recommended standard analysis: includes prevalence
estimates with corresponding standard errors and confidence intervals, and z-score summary statis-
tics (mean and standard deviation) with most common cut-offs describing the full index distribution
(-3, -2, -1, +1, +2, +3), and at disaggregated levels for all available factors (age and sex).
Usage
anthroplus_prevalence(
sex,
age_in_months = NA_real_,
oedema = "n",
height_in_cm = NA_real_,
weight_in_kg = NA_real_,
sw = NULL,
cluster = NULL,
strata = NULL
)
Arguments
sex A numeric or text variable containing gender information. If it is numeric, its
values must be: 1 for males and 2 for females. If it is character, it must be "m"
or "M" for males and "f" or "F" for females. No z-scores will be calculated if
sex is missing.
age_in_months A numeric variable containing age information; Age-related z-scores will NOT
be calculated if age is missing.
oedema The values of this character variable must be "n", "N" or "2" for non-oedema,
and "y", "Y", "1" for oedema. Although it is highly recommended that this
variable is provided by the survey, it is possible to run the analysis without spec-
ifying this variable. If unspecified, the default vector of all "n" with values con-
sidered as non-oedema is used. Missing values will be treated as non-oedema.
For oedema, weight related z-scores are NOT calculated (set to missing), BUT
they are treated as being < -3 SD in the weight-related indicator prevalence
(anthroplus_prevalence) estimation.
anthroplus_prevalence 3
Details
In this function, all available (non-missing and non-flagged) z-score values are used for each indicator-
specific prevalence estimation (standard analysis).
Note: the function temporarily sets the survey option survey.lonely.psu to "adjust" and then
restores the original value. It is a wrapper around the survey package to compute estimates for the
different groups (e.g. by age or sex).
If not all parameter values have equal length, parameter values will be repeated to match the maxi-
mum length.
Only cases with age_in_months between 60 (including) and 228 months (including) are used for
the analysis. The rest will be ignored.
Value
Returns a data.frame with prevalence estimates for the various groups.
The output data frame includes prevalence estimates with corresponding standard errors and confi-
dence intervals, and z-score summary statistics (mean and standard deviation) with most common
cut-offs describing the full index distribution (-3, -2, -1, +1, +2, +3), and at disaggregated levels for
all available factors.
The resulting columns are coded with a prefix, a prevalence indicator and a suffix:
Prefix:
HA Height-for-age
WA Weight-for-age
BMI Body-mass-index-for-age
Prevalence indicator:
_3 Prevalence corresponding to < -3 SD
_2 Prevalence corresponding to < -2 SD
_1 Prevalence corresponding to < -1 SD
1 Prevalence corresponding to > +1 SD
2 Prevalence corresponding to > +2 SD
4 anthroplus_zscores
Examples
set.seed(1)
prev <- anthroplus_prevalence(
sex = c(1, 2),
age_in_months = rpois(100, 100),
height_in_cm = rnorm(100, 100, 10),
weight_in_kg = rnorm(100, 40, 10)
)
prev[, c(1, 4, 5, 6)]
Description
Compute z-scores for age 5 to 19
Usage
anthroplus_zscores(
sex,
age_in_months = NA_real_,
oedema = NA_character_,
height_in_cm = NA_real_,
weight_in_kg = NA_real_
)
anthroplus_zscores 5
Arguments
sex A numeric or text variable containing gender information. If it is numeric, its
values must be: 1 for males and 2 for females. If it is character, it must be "m"
or "M" for males and "f" or "F" for females. No z-scores will be calculated if
sex is missing.
age_in_months A numeric variable containing age information; Age-related z-scores will NOT
be calculated if age is missing.
oedema The values of this character variable must be "n", "N" or "2" for non-oedema,
and "y", "Y", "1" for oedema. Although it is highly recommended that this
variable is provided by the survey, it is possible to run the analysis without spec-
ifying this variable. If unspecified, the default vector of all "n" with values con-
sidered as non-oedema is used. Missing values will be treated as non-oedema.
For oedema, weight related z-scores are NOT calculated (set to missing), BUT
they are treated as being < -3 SD in the weight-related indicator prevalence
(anthroplus_prevalence) estimation.
height_in_cm A numeric variable containing standing height information, which must be in
centimeters. Height-related z-scores will not be calculated if missing.
weight_in_kg A numeric variable containing body weight information, which must be in kilo-
grams. Weight-related z-scores are not calculated if missing.
Details
The following age cutoffs are used:
• Height-for-age age between 60 and 228 months inclusive
• Weight-for-age age between 60 and 120 months inclusive
• BMI-for-age age between 60 and 228 months inclusive
Value
A data.frame with three types of columns. Columns starting with a "c" are cleaned versions of the
input arguments. Columns beginning with a "z" are the respective z-scores and columns prefixed
by a "f" indicate if these z-scores are flagged (integers). The number of rows is given by the length
of the input arguments.
The following columns are returned:
• age_in_months the input age in months
• csex standardized sex information
• coedema standardized oedema value
• cbmi BMI value based on weight/height
• zhfa Height-for-age z-score
• fhfa 1, if abs(zhfa) > 6
• zwfa Weight-for-age z-score
• fwfa 1, if zwfa > 5 or zwfa < -6
• zbfa BMI-for-age z-score
• fbfa 1, if abs(zbfa) > 5
6 Survey_WHO2007
Examples
anthroplus_zscores(
sex = c("f", "m"),
age_in_months = c(100, 110),
height_in_cm = c(100, 90),
weight_in_kg = c(30, 40)
)
Description
The dataset contains information of 933 children aged 61-228 months and it was created using
several surveys; therefore, it does not represent any particular population.
Usage
Survey_WHO2007
Format
A data frame with 933 rows and 12 variables:
strata stratified sampling (integer)
cluster primary sampling unit (integer)
id child identification number (integer)
sex sex of the child (integer; 1=male/2=female)
dob date of birth (date)
dov date of visit (date)
agemons age in months (numeric)
weight child weight in kilograms (numeric)
height child height in centimeters (numeric)
sw child sample weight (numeric)
oedema presence of oedema (character; y=yes/n=no)
region geographical region (character; north/east/west/south)
Index
∗ datasets
Survey_WHO2007, 6
anthroplus_prevalence, 2, 2, 5
anthroplus_zscores, 4
Survey_WHO2007, 6