Learn R Programming

bodycompref

Calculate reference values for body composition

This R package allows batch calculation of reference values and derived metrics for skeletal muscle and subcutaneous and visceral adipose tissue. Please also refer to our website including additional information and a graphical representation: https://bodycomp-metrics.mgh.harvard.edu

Reference values are based on the following publications: Marquardt JP et al.(planned publication 2025; reserved doi: 10.1097/RLI.0000000000001104), "Subcutaneous and Visceral adipose tissue Reference Values from Framingham Heart Study Thoracic and Abdominal CT", Investigative Radiology and Tonnesen PE et al. (2023), "Muscle Reference Values from Thoracic and Abdominal CT for Sarcopenia Assessment [column] The Framingham Heart Study", Investigative Radiology, doi:10.1097/RLI.0000000000001012.

Installation

To download this package from GitHub, please use your standard method of installing non-CRAN packages. If you're installing packages from GitHub for the first time, you can try using the devtools package:

install.packages("devtools")

devtools::install_github("p-mq/bodycompref")

Usage

The package contains GAMLSS models to produce sex-, level-, metric-, and age-specific mappings of a measurement (raw value) to a corresponding z-score/percentile/percent of predicted value. With exception of percent predicted, the transformations are bidirectional.

You can use the same wrapper function (bodycomp_reference) for each transformation and specify the output or use the specific functions (reference_values, reference_percentiles, reference_z_scores, percent_predicted). See the vignette for quick start and the individual function documentation for further information.

Code tested for compatibility with R 4.4.0

Copy Link

Version

Install

install.packages('bodycompref')

Monthly Downloads

136

Version

2.0.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

J. Marquardt

Last Published

July 21st, 2024

Functions in bodycompref (2.0.1)

.Get_reference_model

Get reference models
.Get_percent_predicted

Get % of expected value
.Get_lambda

Get the lambda used to build a model
.Get_reference_value

Get reference for a given combination of model and percentile/z-score
.Get_reference_z_score

Get z-score for a given combination of model and measurement
reference_percentiles

Get percentile(s) for a given combination of model and measurement
percent_predicted

Get % of expected value
.Get_reference_percentile

Get percentile for a given combination of model and measurement
reference_values

Get reference values for a given combination of model and percentile/z-score
bodycomp_reference

Get body composition reference values
reference_z_scores

Get z-scores for a given combination of model and measurement