Package 'anthroplus'

Title: Computation of the WHO 2007 References for School-Age Children and Adolescents (5 to 19 Years)
Description: Provides WHO 2007 References for School-age Children and Adolescents (5 to 19 years) (z-scores) with confidence intervals and standard errors around the prevalence estimates, taking into account complex sample designs. More information on the methods is available online: <https://www.who.int/tools/growth-reference-data-for-5to19-years>.
Authors: Dirk Schumacher [aut, cre], Elaine Borghi [ctb], Giovanna Gatica-Domínguez [ctb], World Health Organization [cph]
Maintainer: Dirk Schumacher <[email protected]>
License: GPL (>= 3)
Version: 1.0.0.9000
Built: 2024-11-12 05:28:47 UTC
Source: https://github.com/worldhealthorganization/anthroplus

Help Index


Compute prevalence estimates

Description

Prevalence estimates according to the WHO recommended standard analysis: includes prevalence estimates with corresponding standard errors and confidence 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 (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 specifying this variable. If unspecified, the default vector of all "n" with values considered 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 kilograms. Weight-related z-scores are not calculated if missing.

sw

An optional numeric vector containing the sampling weights. If NULL, no sampling weights are used.

cluster

An optional integer vector representing clusters. If the value is NULL this is treated as a survey without clusters. This is also the case if all values are equal, then it is assumed there are also no clusters.

strata

An optional integer vector representing strata. Pass NULL to indicate that there are no strata.

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 maximum 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 confidence 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

3

Prevalence corresponding to > +3 SD

Suffix:

_pop

Weighted sample size

_unwpop

Unweighted sample size

_r

Mean/prevalence

_ll

lower 95% confidence interval limit

_ul

upper 95% confidence interval limit

_stdev

Standard Deviation

_se

Standard error

For example:

HA_r

Height-for-age z-score mean

WA_stdev

Weight-for-age z-score Standard Deviation

BMI_2_se

Prevalence of BMI-for-age <-2 SD standard error

BMI_3_ll

Prevalence of BMI-for-age <-3 SD lower 95% confidence interval limit

Note that weight-for-age results are NA for the groups "All" and the two "Sex" groups, as the indicator is only defined for age in months between 60 and 120.

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)]

Compute z-scores for age 5 to 19

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_
)

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 specifying this variable. If unspecified, the default vector of all "n" with values considered 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 kilograms. 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

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)
)

Sample Survey Data for the WHO 2007 References

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)