growthRef: Calculate Z-scores from growth references

Description Usage Arguments Details Value References See Also Examples

View source: R/functions.R

Description

Functions to calculates Z-scores from one or more growth references. growthRef provides an interface for indicating the desired LMS reference and passing growth data to getZ. getZ and getCentile calculate z-scores or centiles from child growth references provided in LMS format.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
getZ(
  x,
  y,
  sex,
  LMS,
  method = c("fmm", "periodic", "natural", "monoH.FC", "hyman", "linear", "constant"),
  rule = 1
)

getCentile(
  x,
  y,
  sex,
  LMS,
  method = c("fmm", "periodic", "natural", "monoH.FC", "hyman", "linear", "constant"),
  rule = 1
)

growthRef(
  x,
  y,
  sex,
  data,
  type = c("Weight", "Height", "BMI", "WFH"),
  pop = c("All", "CDC", "WHO", "Tsimane", "Shuar"),
  LMS = NULL,
  z = c("zscore", "centile"),
  method = c("fmm", "periodic", "natural", "monoH.FC", "hyman", "linear", "constant"),
  rule = 1
)

Arguments

x

a single value or vector of either ages in years or height in cm at which to calcuate Z-scores, or the name of a column or item in data.

y

a single value or vector of measures (heights, weights, BMIs) to be converted to Z-scores, or the name of a column or item in data. For included LMS references, height should be in cm, weight in kg, and BMI in kg/m^2.

sex

a single value or vector of sexes, or the name of a column or item in data. Sex must be coded for males/females as 1/0, 1/2, 'm'/'f', 'M'/'F', 'Male'/'Female', or 'male'/'female'.

LMS

a data frame containing the LMS table with columns named "Sex","Age","Lambda","Mu", "Sigma" or "Sex","Height","Lambda","Mu","Sigma". For growthRef this will typically be NULL, as type and pop will be used to determine the appropriate internal LMS tables.

method

the interpolation method. If it is "fmm", "periodic", "natural", "monoH.FC", or "hyman", splinefun is used. If method is "linear" or "constant", approxfun is used.

rule

an integer (of length 1 or 2) describing how interpolation is to take place outside the interval [min(x), max(x)]. If rule is 1 then NAs are returned. If rule is 2 and method is "linear" or "constant", then rule is followed as in approxfun. If rule is 2 and a spline is used, the spline will be used to extrapolate outside the interval. If rule is length 2 (i.e c(2,1)), then different rules will be used for the left and right side extrapolation.

data

an optional data frame or list containing x, y, or sex.

type

a string indicating the type of Z-score to calculate, corresponding to the measures in x and y. Either "Weight","Height","BMI", or "WFH", indicating weight-for-age, height-for-age, BMI-for-age, or weight-for-height.

pop

the references or standards to return Z-scores based on. Can be "All","CDC","WHO","Tsimane",or "Shuar", with "All" equivalent to pop=c("CDC","WHO","Tsimane","Shuar"). Subsets are also allowed, i.e. pop=c("CDC","Tsimane").

z

a string. Either "zscore" or "centile" indicating the type of value to return.

Details

growthRef returns Z-scores calculated from lambda, mu, sigma (LMS) tables from various sources. growthRef acts as a wrapper that selects the appropriate LMS tables and passes them to getZ to interpolate LMS values and calculate z-scores at the exact age or height specified. At present, growthRef can provide z-scores based on four different growth references: the Tsimane, an indigenous group of Bolivia, the Shuar, an indigenous group of Ecuador, and references or standards from the US Center for Disease Control (CDC) and the World Health Organization (WHO). Internal LMS tables are typically referenced indirectly by growthRef, but can be referenced directly by pop.type, i.e. Tsimane.Height. See below for relevant citations and ranges for each growth reference.

Valid x-value ranges for included references and standards

HFA (yrs) WFA (yrs) BFA (yrs) WFH (cm)
CDC 0-20 0-20 2-20 45-121
WHO 0-19 0-10 0-19 45-120
Tsimane 0-25 0-25 0-25 45-170
Shuar 0-25 0-25 0-25 N/A

Note: For CDC and WHO references, height and length are combined together, with a junction at 2 years of age for height-for-age, and 80.5 cm for weight for height.

getZ calculates z-scores for growth data using an LMS data table, by first determining the appropriate L,M, and S values for a given observation by matching based on sex and then interpolating the L, M, and S values for the exact x-value (age or height) for the observation. Interpolation is done using either splinefun or approxfun, as determined by the method parameter. By default, observations outside the range of the reference LMS are returned as NA, but this can be overridden to allow for extrapolation by setting the rule parameter. See approxfun.

getCentile is simply a wrapper that passes parameters to getZ and then converts the z-scores to centiles using pnorm.

Value

Returns either a data frame with columns corresponding to the requested Z-scores or centiles, or a vector, if only a single Z-score is requested.

References

Tsimane: Blackwell, AD, Urlacher, SS, Beheim, B, von Rueden, C, Jaeggi, A, Stieglitz, J, Tumble, BC, Gurven, MD, Kaplan, H. (2017) Growth references for Tsimane forager-horticulturalists of the Bolivian Amazon, American Journal of Physical Anthropology. 162(3) 441-461. DOI: 10.1002/ajpa.23128.

Shuar: Urlacher, SS, Blackwell, AD, Liebert, MA, Madimenos, FC, Cepon-Robins, TJ, Gildner, TE, Snodgrass, JJ, Sugiyama, LS. (2016) Physical Growth of the Shuar: Height, Weight, and BMI Growth References for an Indigenous Amazonian Population, American Journal of Human Biology, 28(1): 16-30. DOI: 10.1002/ajhb.22747.

CDC: Kuczmarski, R. J., Ogden, C. L., Guo, S. S., Grummer-Strawn, L. M., Flegal, K. M., Mei, Z., Wei, R., Curtin, L. R., Roche, A. F., Johnson, C. L. (2002). 2000 CDC Growth Charts for the United States: Methods and development. Vital Health Statistics 11,1-190.

https://www.cdc.gov/growthcharts/data_tables.htm

WHO: World Health Organization. (2006). New child growth standards: Length/ height-for-age, weight-for-age, weight-for-length, weight-for-height and body mass index-for-age: Methods and development. Geneva: World Health Organization

de Onis, M., Onyango, A., Borghi, E., Siyam, A., Nishida, C., & Siekman, J. (2007). Development of a WHO growth reference for school-aged children and adolescents. Bulletin of World Health Organization, 85, 660-667.

http://www.who.int/childgrowth/en/. http://www.who.int/growthref/en/.

See Also

ZfromLMS, splinefun, approxfun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#Height-for-age
data(TsimaneData)
HFA<-growthRef(Age,Height,Sex,data=TsimaneData,type="Height")

#Height-for-age, just CDC and Tsimane
HFA<-growthRef(Age,Height,Sex,data=TsimaneData,type="Height",pop=c("CDC","Tsimane"))

#Weight-for-height, CDC centiles only
WFH<-growthRef(Height,Weight,Sex,data=TsimaneData,type="WFH",pop="CDC",z="centile")

#The same as above, but referencing the CDC.WFH table directly
WFH<-growthRef(Height,Weight,Sex,data=TsimaneData,LMS=CDC.WFH,z="centile")

#Tsimane specific z-score for a single individual, age 2 yrs, 75 cm, male.
getZ(2,75,"Male",Tsimane.Height)

LMS<-getLMS(0:10,"Male",Tsimane.Height)
cent<-centilesLMS(0:10,"Male",Tsimane.Height,cent=c(0.025,0.5,0.975))

adblackwell/localgrowth documentation built on Jan. 26, 2020, 4:43 p.m.