gs_cdf: Cumulative Distribution Plots for Pediatric Growth Standards

View source: R/gs_cdf.R

gs_cdfR Documentation

Cumulative Distribution Plots for Pediatric Growth Standards

Description

Cumulative Distribution Plots for Pediatric Growth Standards

Usage

gs_cdf(
  metric,
  male,
  age,
  height,
  length,
  source = getOption("pedbp_pgs_source", "CDC")
)

Arguments

metric

a character string denoting which growth metric to plot

male

integer value, 1 = male, 0 = female

age

numeric age, in months

length, height

in centimeters

source

a character string denoting the data source providing the parameters needed for the estimate. Valid values are "CDC" and "WHO". This can be set explicitly, or by using the pedbp_pgs_source option.

Value

a ggplot object

See Also

  • Distribution functions:

    • bmi_for_age

    • head_circumference_for_age

    • height_for_age

    • length_for_age

    • weight_for_age

    • weight_for_length

    • weight_for_height

  • Plotting functions:

    • gs_chart

    • gs_cdf

  • Vignette:

    • vignette(topic = "growth-standards", package = "pedbp")

Examples


# Plot a # 13 year old male with a bmi of 21
gs_chart(metric = "bmi_for_age", male = 1) +
  ggplot2::geom_point(x = 13 * 12, y = 21)

gs_cdf(metric = "bmi_for_age", male = 1, age = 13*12) +
  ggplot2::geom_point(x = 21, y = p_bmi_for_age(21, male = 1, age = 13*12))


dewittpe/pedbp documentation built on Jan. 26, 2025, 8:02 p.m.