Package 'MUACz'

Title: Generate MUAC and BMI z-Scores and Percentiles for Children and Adolescents
Description: Generates mid upper arm circumference (MUAC) and body mass index (BMI) for age z-scores and percentiles based on LMS method for children and adolescents up to 19 years that can be used to assess nutritional and health status and define risk of adverse health events.
Authors: Lazarus Mramba [aut, cre], James Berkley [aut]
Maintainer: Lazarus Mramba <[email protected]>
License: GPL-3
Version: 2.1.0
Built: 2025-02-19 02:42:44 UTC
Source: https://github.com/cran/MUACz

Help Index


Generate Body Mass Index z-scores for age and percentiles for children/adolescents given their age, sex, and bmi values.

Description

Generates Body Mass Index (BMI) for age z-scores and percentiles based on LMS method for children and adolescents aged 0 to 19 years.

Usage

bmizs(
  Datafm,
  age_range = "0-24",
  digits.zscore = 2,
  digits.perc = 2,
  Notes = FALSE
)

Arguments

Datafm

A DataFrame with variables age (in months), sex (1, 2 or "Male", "Female"), bmi (numeric: in kilograms per meter squared (kg/m^2)).

age_range

age range in months. Input has to be characters. It allows "0-24" by default. Other inputs allowed are "24-60" or "61-228".

digits.zscore

The number of digits for z-score variable

digits.perc

The number of digits for percentile variable

Notes

Is FALSE by default. If set to TRUE, 'notes' will be printed on the console about the nature, range of variables allowed and number of records processed.

Value

A DataFrame with BMI z scores for age and percentiles.

References

<https://www.who.int/childgrowth/standards/bmi_for_age/en/>

<https://www.who.int/growthref/who2007_bmi_for_age/en/>

<https://www.who.int/childgrowth/standards/Technical_report.pdf>

See Also

indivmuaczs, muaczs, muacz.bmiz, plotmuac and plotbmi.

Examples

## Example 1: for younger age range = "0-24" months
## No need to specify age_range
## creating a hypothetical dataset

dat1 <- data.frame(age = c(5, 6, 12, 12, 18, 18, 23, 23),
        sex = c(1, 2, 1, 2, 1, 2, 1, 2),
        bmi = c(17.3, 18.6, 18.2, 12.7, 20.8, 20.8, 13.6, 18.4))

ans1 <- bmizs(Datafm = dat1)
ans1 <- bmizs(Datafm = dat1, Notes = TRUE) # Will also print notes
# ans1

## Example 2: specify age range = "24-60" months
## creating a hypothetical dataset

dat2 <- data.frame(age = c(25, 36, 48, 60),
        sex = 2, bmi = c(15.7, 16.8, 20.6, 12.7))

ans2 <- bmizs(Datafm = dat2, age_range = "24-60")
# ans2

## Example 3: specify age range = "61-228" months
## creating a hypothetical dataset

dat3 <- data.frame(age = c(61, 73, 181, 217),
        sex = 1, bmi = c(12.1, 14.1, 27.1, 35.4))

ans3 <- bmizs(Datafm = dat3, age_range = "61-228")
# ans3

Generate MUAC z scores and percentiles for age for single individuals given their age, sex and MUAC values.

Description

Generates MUAC z-Scores and percentiles for individual subjects by entering their age (in months), sex and muac (in cm) directly. This is useful for children and adolescents aged 3 months to 19 years and to assess their nutritional and health status, and define risk of adverse health events.

Usage

indivmuaczs(
  age = 60,
  sex = 1,
  muac = 10,
  age_range = "3-60",
  digits.zscore = 2,
  digits.perc = 2,
  Notes = FALSE
)

Arguments

age

a numeric value (in months) between 3 and 228 depending on the age_range.

sex

preferably numeric (1 = Male, 2 = Female). Strings can also be used.

muac

a numeric mid upper arm circumference value in cm.

age_range

age range in months. Input has to be characters. Options allowed are: "3-60" the default, or "60-228".

digits.zscore

The number of digits for z-score variable

digits.perc

The number of digits for percentile variable

Notes

Is FALSE by default. If set to TRUE, 'notes' will be printed on the console about the nature, range of variables allowed and number of records processed.

Value

A DataFrame with MUAC z-scores and percentiles.

References

Mramba L., Ngari M., Mwangome M., Muchai L., Bauni E., Walker A.S., Gibb D.M., Fegan G. and Berkley J.A. (2017) A growth reference for mid upper arm circumference for age among school age children and adolescents, and validation for mortality: growth curve construction and longitudinal cohort study BMJ 2017;358:j3423 <doi:10.1136/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423/related#datasupp>

<https://www.who.int/childgrowth/standards/Technical_report.pdf>

<https://www.who.int/childgrowth/standards/ac_for_age/en/>

See Also

muaczs, bmizs, muacz.bmiz, plotmuac and plotbmi.

Examples

test0 <- indivmuaczs(age = 70, sex = "Female", muac = 15.8,
          age_range = "60-228")
# test0

test1 <- indivmuaczs(age = c(4, 40, 60), sex = "Male",
          muac = c(17.2, 17.2, 19.8), age_range = "3-60")
# test1

test2 <- indivmuaczs(age = c(4, 40, 60), sex = 2,
         muac = c(14.9, 17.7, 19))
# test2

res2 <- indivmuaczs(age = 70, sex = c(1, 1, 2, 2, 2, 1),
                   muac = c(23.1, 15.2, 18.4, 13.9, 19.5, 14.6),
                   age_range = "60-228")
# res2

Generate both MUAC z-scores and BMI z-scores and their percentiles for age for children/adolescents given their age, sex, MUAC, and BMI values.

Description

Generates both MUAC and BMI z-scores for age z-scores and percentiles based on LMS method for children and adolescents aged 3 months to 19 years olds.

Usage

muacz.bmiz(
  Datafm,
  age_range.muac = "60-228",
  age_range.bmi = "61-228",
  digits.zscore = 2,
  digits.perc = 2,
  Notes = FALSE
)

Arguments

Datafm

A DataFrame with variables including, age (in months), sex (1, 2 or "Male", "Female"), muac (numeric: in cm).

age_range.muac

MUAC age range in months: This can be "3-60" or "60-228".

age_range.bmi

BMI age range in months: This can be "0-24", "24-60" or "61-228".

digits.zscore

The number of digits for z-score variable

digits.perc

The number of digits for percentile variable

Notes

Is FALSE by default. If set to TRUE, 'notes' will be printed on the console about the nature, range of variables allowed and number of records processed.

Value

A DataFrame with MUAC and BMI z-scores and their percentiles

References

Mramba L., Ngari M., Mwangome M., Muchai L., Bauni E., Walker A.S., Gibb D.M., Fegan G. and Berkley J.A. (2017) A growth reference for mid upper arm circumference for age among school age children and adolescents, and validation for mortality: growth curve construction and longitudinal cohort study BMJ 2017;358:j3423 <doi:10.1136/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423/related#datasupp>

<https://www.who.int/childgrowth/standards/bmi_for_age/en/>

<https://www.who.int/growthref/who2007_bmi_for_age/en/>

<https://www.who.int/childgrowth/standards/Technical_report.pdf>

<https://www.who.int/childgrowth/standards/ac_for_age/en/>

See Also

indivmuaczs, muaczs, bmizs, plotmuac and plotbmi.

Examples

## Example 1
## creating a hypothetical dataset
dat1 <- data.frame(age = c(61, 73, 181, 217), sex = 1,
                     muac = c(13.0, 15.7, 34.1, 43.9),
                      bmi = c(12.1, 14.1, 27.1, 35.4))
ans1 <- muacz.bmiz(Datafm = dat1, age_range.muac = "60-228",
                 age_range.bmi = "61-228")
# ans1

## Example 1
## creating a hypothetical dataset
dat2 <- data.frame(age = c(25, 36, 48, 60),
                  sex = 2,
                  muac = c(15, 17, 21.3, 14),
                  bmi = c(15.7, 16.8, 20.6, 12.7))
ans2 <- muacz.bmiz(Datafm = dat2, age_range.muac = "3-60",
          age_range.bmi = "24-60")
# ans2

Generate MUAC z-scores and percentiles for age for children and adolescents given their age, sex, and MUAC values.

Description

Generates mid upper arm circumference (MUAC) for age z-scores and percentiles based on LMS-method for children and adolescents aged 3 months to 19 years.

Usage

muaczs(
  Datafm,
  age_range = "3-60",
  digits.zscore = 2,
  digits.perc = 2,
  Notes = FALSE
)

Arguments

Datafm

A DataFrame with variables including pid (unique subject identification), age (in months), sex (1, 2 or "Male", "Female"), muac (numeric: in cm).

age_range

age range in months. Input has to be characters. Options allowed are: "3-60" which is the default, or "60-228"

digits.zscore

The number of digits for z-score variable

digits.perc

The number of digits for percentile variable

Notes

Is FALSE by default. If set to TRUE, 'notes' will be printed on the console about the nature, range of variables allowed and number of records processed.

Value

A DataFrame with MUAC z scores for age and percentiles.

References

Mramba L., Ngari M., Mwangome M., Muchai L., Bauni E., Walker A.S., Gibb D.M., Fegan G. and Berkley J.A. (2017) A growth reference for mid upper arm circumference for age among school age children and adolescents, and validation for mortality: growth curve construction and longitudinal cohort study BMJ 2017;358:j3423 <doi:10.1136/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423/related#datasupp>

<https://www.who.int/childgrowth/standards/Technical_report.pdf>

<https://www.who.int/childgrowth/standards/ac_for_age/en/>

See Also

indivmuaczs, bmizs, muacz.bmiz, plotmuac and plotbmi.

Examples

## Example 1: younger age range is the default: 3 months - 5 years
# Creating a hypothetical dataset

dat1 <- data.frame(age = c(3, 5, 12, 18, 23, 24, 36, 48, 60, 24, 36, 48, 60),
        sex = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2),
        muac = c(15.6, 14.1, 15.8, 18.7, 12.9, 13,
        14.5, 16.1, 21.7, 12.7, 14.4, 16.2, 22.5))
# Run the function
ans1 <- muaczs(Datafm = dat1) # save the output
# ans1

 ## Example 2: For children 5-19 years old, specify their age range "61-228"
 # Creating a hypothetical dataset
 dat1 <- data.frame(age = c(60, 65, 90, 120, 220),
         sex = c("Male","Female","Male","Male","Female"),
         muac = c(20, 14.3, 15.4, 17.8, 25.1))

ans1 <- muaczs(Datafm = dat1, age_range = "60-228")
# ans1

Plots BMI z-scores and percentiles on references curves.

Description

Plots BMI z-scores and percentiles on standardized growth references using the LMS method for children and adolescents aged 0 to 19 years.

Usage

plotbmi(
  age,
  sex,
  bmi,
  lwd = 1,
  age_range = "0-24",
  line.color = "skyblue",
  graphtype = "z-scores",
  size.label = 2,
  size.score = 4,
  line.type = "solid",
  shape = 2,
  Notes = FALSE
)

Arguments

age

a numeric value (in months) from 0 to 228 depending on the age_range.

sex

preferably numeric (1 = Male, 2 = Female). Strings (such as "Male", "Female") can also be used.

bmi

a numeric value in kilograms per meter squared (kg/m^2).

lwd

Line width allows you to specify a numeric value that control the width of the line plots. By dafult, it is set to 1.

age_range

age range in months. Input has to be characters. It allows "0-24" by default. Other inputs allowed are "24-60" or "61-228".

line.color

The color of the lines. It is set to "skyblue" by default.

graphtype

A character input is required: "z-scores" or "percentiles".

size.label

size of the label for calculated z-score or percentile

size.score

refers to the size of the text for the calculated z-scores (-3,-2,-1,0,1,2,3) or the percentiles.

line.type

Type of line such as: "solid", "dotted", "dashed", "blank", "dotdash", "twodash", "longdash"

shape

of the individual point (marker)

Notes

Is FALSE by default. If set to TRUE, 'notes' will be printed on the console about the nature, range of variables allowed and number of records processed.

Value

Plots z-scores or percentiles with a mark indicating where the individual person lies within the standardized reference curves.

References

<https://www.who.int/childgrowth/standards/bmi_for_age/en/>

<https://www.who.int/growthref/who2007_bmi_for_age/en/>

<https://www.who.int/childgrowth/standards/Technical_report.pdf>

See Also

indivmuaczs, muaczs, bmizs, muacz.bmiz and plotmuac.

Examples

g1 <- plotbmi(age = 6, sex = 2, bmi = 18.5) # plots Z-scores

g2 <- plotbmi(age = 6, sex = 2, bmi = 18.5, graphtype = "percentiles")

g3 <- plotbmi(age = c(25, 36, 48, 60), sex = 2, bmi = c(15.7, 16.8, 20.6, 12.7),
      age_range = "24-60")

g4 <- plotbmi(age = c(61, 73, 181, 217), sex = 1, bmi = c(12.1, 14.1, 27.1, 35.4),
      age_range = "61-228", graphtype = "percentiles")

Plots MUAC z-scores and percentiles on references curves.

Description

Plots individual MUAC z-scores and percentiles on standardized growth references using the LMS method for children and adolescents aged 3 months to 19 years.

Usage

plotmuac(
  age,
  sex,
  muac,
  age_range = "3-60",
  graphtype = "z-scores",
  lwd = 1,
  line.color = "skyblue",
  line.type = "solid",
  shape = 2,
  size.label = 2,
  size.score = 4,
  Notes = FALSE
)

Arguments

age

a numeric value (in months) between 3 and 228 depending on the age_range.

sex

preferably numeric (1 = Male, 2 = Female). Strings (such as "Male", "Female") can also be used.

muac

a numeric mid upper arm circumference value in cm.

age_range

age range in months. Input has to be characters. Options allowed are: "3-60" which is the default, or "60-228".

graphtype

A character input is required: "z-scores" or "percentiles".

lwd

Line width allows you to specify a numeric value that control the width of the line plots. By dafult, it is set to 1.

line.color

The color of the lines. It is set to "skyblue" by default.

line.type

Type of line such as: "solid", "dotted", "dashed", "blank", "dotdash", "twodash", "longdash"

shape

of the individual point (marker)

size.label

size of the label for calculated z-score or percentile

size.score

refers to the size of the text for the calculated z-scores (-3,-2,-1,0,1,2,3) or the percentiles.

Notes

Is FALSE by default. If set to TRUE, 'notes' will be printed on the console about the nature, range of variables allowed and number of records processed.

Value

Plots z-scores or percentiles with a mark indicating where the individual person lies within the standardized reference curves.

References

Mramba L., Ngari M., Mwangome M., Muchai L., Bauni E., Walker A.S., Gibb D.M., Fegan G. and Berkley J.A. (2017) A growth reference for mid upper arm circumference for age among school age children and adolescents, and validation for mortality: growth curve construction and longitudinal cohort study BMJ 2017;358:j3423 <doi:10.1136/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423>

<https://www.bmj.com/content/358/bmj.j3423/related#datasupp>

<https://www.who.int/childgrowth/standards/Technical_report.pdf>

<https://www.who.int/childgrowth/standards/ac_for_age/en/>

See Also

indivmuaczs, muaczs, bmizs, muacz.bmiz and plotbmi.

Examples

g1 <- plotmuac(age = 48, sex = 2, muac = 16.2, line.color = "orange")

g2 <- plotmuac(age = 48, sex = 2, muac = 16.2, graphtype = "percentiles",
              line.color = "orange")

g3 <- plotmuac(age = c(24, 36, 48, 59), sex = 1, muac = c(13, 14.5, 16.1, 21.7))

g4 <- plotmuac(age = c(24, 36, 48, 59), sex = 1, muac = c(13, 14.5, 16.1, 21.7),
              graphtype = "percentiles")

g5 <- plotmuac(age = c(61, 73, 181, 217), sex = 1, muac = c(13, 15.7, 34.1, 43.9),
              age_range = "60-228")

g6 <- plotmuac(age = c(61, 73, 181, 217), sex = 1, muac = c(13, 15.7, 34.1, 43.9),
              age_range = "60-228", graphtype = "percentiles")