calc_QR: Calculate the quantitative response (QR) of C-peptide AUC

View source: R/calc_QR.R

calc_QRR Documentation

Calculate the quantitative response (QR) of C-peptide AUC

Description

This function calculates the quantitative response (QR) of Bundy et al. 2020 (PMID 32704564) for a mixed meal tolerance test (MMTT), with expansions for other timepoints by Ylescupidez et al. 2023 (PMID 37940642). As input, it takes a data frame with age, baseline C-peptide AUC, and C-peptide AUC at the specified timepoint (all for each subject), and the timepoint for which to calculate the QR. NOTE: Values for AUC must be in the standardized units used in the QR model, specifically in units of nmol per L per minute from a 120-minute MMTT (not log-transformed). Values for age must be in years.

Usage

calc_QR(
  input_data, timepoint = 12, cpeptide_baseline_colname = "auc_mean_baseline",
  cpeptide_timepoint_colname = "auc_mean", age_colname = "age_years")

Arguments

input_data

data frame containing the C-peptide AUC values from MMTTs and subject ages.

timepoint

numeric, the number of months at which to calculate the expected C-peptide value. Current implementation only supports 12.

cpeptide_baseline_colname

character or numeric, the column containing the C-peptide values. Defaults to "auc_mean_baseline".

cpeptide_timepoint_colname

character or numeric, the column containing the C-peptide values. Defaults to "auc_mean".

age_colname

character or numeric, the column containing the age values. Defaults to "age_years".

Details

The equation used is: "QR = Cpep_actual - Cpep_expected = ln(Cpep_timepoint + 1) + 0.191 - 0.812 * ln(Cpep_baseline + 1) - 0.00638 * Age"

Value

a vector containing the QR values at the specified timepoint, in ln(nmol/L/min + 1).


mjdufort/CpeptideTools documentation built on March 5, 2025, 6:58 p.m.