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 |
Function to add to lmsdata in data_env environment
add_lmsdata(df)
add_lmsdata(df)
df |
Dataframe of new LMS data to add |
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
get_chartmetadata()
get_chartmetadata()
head(get_chartmetadata())
head(get_chartmetadata())
Function to interpolate LMS parameters, given age, gender, chart, and measure
get_lms(age, gender, chart, measure = "weight")
get_lms(age, gender, chart, measure = "weight")
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' |
get_lms(c(11.5, 11.5), c('m', 'f'), chart = 'cdc_2000_infant', measure = 'weight')
get_lms(c(11.5, 11.5), c('m', 'f'), chart = 'cdc_2000_infant', measure = 'weight')
Function to return the dataframe containing all LMS values, measures, and units of measure, including any added with add_lmsdata()
get_lmsdata()
get_lmsdata()
head(get_lmsdata())
head(get_lmsdata())
This function takes a VON export converted into a dataframe, and recodes the variables.
recode_von(von)
recode_von(von)
von |
A dataframe output of a VON data export |
# recode_von()
# recode_von()
This function takes a link to a VON XML export and coverts it into a dataframe and recodes the variables.
recode_von_xml(von_xml)
recode_von_xml(von_xml)
von_xml |
A link to the XML output of a VON data export |
# recode_von_xml()
# recode_von_xml()
function to convert X + LMS parameters to a Z-score
x_lms_to_z(x, lms)
x_lms_to_z(x, lms)
x |
Vector of measurements |
lms |
List of L, M, and S elements, each with length(x) elements |
# x_lms_to_z()
# x_lms_to_z()
Function to take vectors of measurements, age, and gender, and unique chart and measure, to return Z score
x_to_z(x, age, gender, chart, measure = "weight")
x_to_z(x, age, gender, chart, measure = "weight")
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'. |
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) |
# 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)
# 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)
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.
z_lms_to_x(Z, L, M, S)
z_lms_to_x(Z, L, M, S)
Z |
Z parameter(s) |
L |
lambda parameter(s) |
M |
mu parameter(s) |
S |
sigma parameter(s) |
# z_lms_to_x()
# z_lms_to_x()