Package 'peditools'

Title: Pediatric Clinical Data Science Tools
Description: A collection of tools for newborn and pediatric anthropometric calculations and data abstraction from Vermont Oxford Network registry exports. Includes charts based on Lambda, Mu, Sigma (LMS) parameters, including: Fenton 2003, Olsen 2010, Olsen BMI, CDC infant, CDC pediatric, CDC BMI, CDC (Addo) skin, WHO infant, WHO skin, Abdel-Rahman 2017, Mramba 2017, Zemel Down Syndrome, Brooks cerebral palsy, WHO expanded, Cappa 2024 (except BMI). Includes functions to take a Vermont Oxford Network XML or CSV data file export read into a data frame, converting the coded variables into human readable factors.
Authors: Joseph Chou [aut, cre]
Maintainer: Joseph Chou <[email protected]>
License: MIT + file LICENSE
Version: 0.3.1.00
Built: 2025-01-08 22:30:57 UTC
Source: https://github.com/jhchou/peditools

Help Index


Add lmsdata

Description

Function to add to lmsdata in data_env environment

Usage

add_lmsdata(df)

Arguments

df

Dataframe of new LMS data to add


Get chart metadata

Description

Function to return the dataframe containing chart metadata, including chart name, anthropometric measure and units, age label and units with min, max, and range, number of parameters, source text and URL, and notes

Usage

get_chartmetadata()

Examples

head(get_chartmetadata())

Get LMS parameters function

Description

Function to interpolate LMS parameters, given age, gender, chart, and measure

Usage

get_lms(age, gender, chart, measure = "weight")

Arguments

age

Vector of ages

gender

Vector of gender, either 'm' or 'f'

chart

Which chart to obtain LMS parameters for

measure

Which measure for the chart. Defaults to 'weight'

Examples

get_lms(c(11.5, 11.5), c('m', 'f'), chart = 'cdc_2000_infant', measure = 'weight')

Get lmsdata

Description

Function to return the dataframe containing all LMS values, measures, and units of measure, including any added with add_lmsdata()

Usage

get_lmsdata()

Examples

head(get_lmsdata())

VON recoding function

Description

This function takes a VON export converted into a dataframe, and recodes the variables.

Usage

recode_von(von)

Arguments

von

A dataframe output of a VON data export

Examples

# recode_von()

VON XML recoding function

Description

This function takes a link to a VON XML export and coverts it into a dataframe and recodes the variables.

Usage

recode_von_xml(von_xml)

Arguments

von_xml

A link to the XML output of a VON data export

Examples

# recode_von_xml()

X and LMS to Z function

Description

function to convert X + LMS parameters to a Z-score

Usage

x_lms_to_z(x, lms)

Arguments

x

Vector of measurements

lms

List of L, M, and S elements, each with length(x) elements

Examples

# x_lms_to_z()

X to Z-score function

Description

Function to take vectors of measurements, age, and gender, and unique chart and measure, to return Z score

Usage

x_to_z(x, age, gender, chart, measure = "weight")

Arguments

x

Vector of measurements

age

Vector of age parameters

gender

Vector of genders, either 'm' or 'f'

chart

Uniquely specified chart to obtain LMS parameters for

measure

Uniquely specified measure for the chart. Defaults to 'weight'.

Details

The following charts are available, with their corresponding measures.

chart age_units measures
abdel-rahman_2017 months arm_circ(cm)
addo_2010_skin years subscapular(mm), triceps(mm)
brooks_gmfcs_1 years bmi(kg/m2), height(cm), weight(kg)
brooks_gmfcs_2 years bmi(kg/m2), height(cm), weight(kg)
brooks_gmfcs_3 years bmi(kg/m2), height(cm), weight(kg)
brooks_gmfcs_4 years bmi(kg/m2), height(cm), weight(kg)
brooks_gmfcs_5_nt years bmi(kg/m2), height(cm), weight(kg)
brooks_gmfcs_5_tf years bmi(kg/m2), height(cm), weight(kg)
cappa_2024 years height_velocity(cm/year), height(cm), weight(kg)
cdc_2000_bmi months bmi(kg/m2)
cdc_2000_infant months head_circ(cm), length(cm), weight(kg)
cdc_2000_pedi months height(cm), weight(kg)
fenton_2003 weeks head_circ(cm), length(cm), weight(kg)
mramba_2017 months arm_circ(cm)
olsen_2010 weeks head_circ(cm), length(cm), weight(g)
olsen_2015_bmi weeks bmi(g/cm2)
who_2006_infant months head_circ(cm), length(cm), weight(kg)
who_2007_skin_arm months arm_circ(cm), subscapular(mm), triceps(mm)
who_expanded days bmi(kg/m2), head_circ(cm), length_height(cm), weight(kg)
who_expanded_arm_skin days arm_circ(cm), subscapular(mm), triceps(mm)
who_wt_for_ht cm weight(kg)
who_wt_for_len cm weight(kg)
zemel_2015_infant months head_circ(cm), length(cm), weight(kg)
zemel_2015_pedi years bmi(kg/m2), head_circ(cm), height(cm), weight(kg)

Examples

# 3, 10, 50, 90, and 97%ile weight for 8.5 month old female on CDC 2000 infant chart
x_to_z(
    c(6.720327734, 7.197413532, 8.314178377, 9.573546299, 10.2153883),
    rep(8.5, 5),
    rep('f', 5),
    chart = 'cdc_2000_infant',
    measure = 'weight'
  )
round( pnorm( x_to_z(
    c(6.720327734, 7.197413532, 8.314178377, 9.573546299, 10.2153883),
    rep(8.5, 5),
    rep('f', 5),
    chart = 'cdc_2000_infant',
    measure = 'weight'
  ) ), 4)

Z and LMS to X function

Description

Vectorized function to convert Z + LMS parameters to a measurement. If Z, L, M, or S are vectors of different length, will recycle the shorter vectors.

Usage

z_lms_to_x(Z, L, M, S)

Arguments

Z

Z parameter(s)

L

lambda parameter(s)

M

mu parameter(s)

S

sigma parameter(s)

Examples

# z_lms_to_x()