isi_calculator | R Documentation |
Calculates surrogate insulin sensitivity indices based on fasting, OGTT, and lipid (adipo) values values.
isi_calculator(data, category = c("fasting", "ogtt", "adipo", "tracer_dxa"))
data |
A dataframe with variables for calculating indices.
The variables include measurements of insulin and glucose at fasting (0 minutes), 30 minutes, and 120 minutes after an oral glucose tolerance test, along with triglycerides, HDL cholesterol, and other necessary parameters.
The variable names in the input dataframe should match those specified in the documentation (see |
category |
Specify categories of indices to calculate through a character vector.
If your data includes only fasting insulin and glucose measurements, use the "fasting" category.
For calculations involving Oral Glucose Tolerance Test (OGTT) values, select the "ogtt" category; if 30-minute values are absent, the function will compute indices using only the 0 and 120-minute measurements.
To incorporate lipid measurements such as triglycerides (TG), free fatty acids (FFA), and HDL cholesterol (HDL-C), choose the "adipo" category.
Both the "ogtt" and "adipo" categories also require anthropometric data, including age, sex, weight, body mass index (BMI), and waist circumference.
To calculate indices across all categories, either leave the argument empty or specify a list of desired categories, for example, |
It requires specific columns in the data for each category:
fasting
: "G0", "I0"
ogtt
: "G0", "I0", "G120", "I120", "G30", "I30", "age", "sex", "bmi", "weight"
adipo
: "G0", "I0", "G120", "I120", "G30", "I30", "age", "sex", "bmi", "weight", "TG", "HDL_c", "FFA", "waist"
tracer_dxa
: This category includes all of the columns required for adipo
plus specific tracer and DXA measures: "rate_palmitate", "rate_glycerol", "fat_mass"
.
Ensure that the data frame contains these columns when selecting this category for accurate calculation.
It also performs the following unit conversions as part of the calculations:
Glucose: Converts from mmol/L to mg/dL using the formula value * 18
.
Insulin: Converts from pmol/L to µU/ml using the formula value / 6
.
Triglycerides: Converts from mmol/L to mg/dL using the formula value * 88
.
HDL cholesterol: Converts from mmol/L to mg/dL using the formula value * 38
.
Additionally, for the calculation of Belfiore_inv_FFA, the function converts Free Fatty Acids (FFA) values to Area Under Curve (AUC) as part of the preprocessing.
Supported options for category
are "fasting", "ogtt", "adipo", and "tracer_dxa".
Specific indices calculated for each category are detailed within each category section.
Indices based on fasting measurements.
Indices based on OGTT measurements.
Indices based on adipose tissue measurements.
Special indices involving tracer and DXA measurements.
The calculation of most indices follows established formulas documented in the references, with units and other details conforming to the standards set forth in the literature. Although not all original references are explicitly provided, they were consulted individually for each index calculation.
References:
Gastaldelli (2022). <doi.org/10.1002/oby.23503>
Lorenzo (2010). <doi.org/10.1210/jc.2010-1144>
This function returns a dataframe with Insulin Sensitivity indices calculated for the chosen categories. The output values are raw and have not undergone any normalization or transformation. For subsequent analyses, particularly statistical testing and visualization, it's advisable to normalize these values due to their varying scales.
data(example_data)
# Example usage of the isi_calculator function
# Run the isi_calculator function with the sample data
# run for each category separately
result <- isi_calculator(example_data, category = "fasting")
result <- isi_calculator(example_data, category = "ogtt")
result <- isi_calculator(example_data, category = "adipo")
result <- isi_calculator(example_data, category = "tracer_dxa")
# OR all four together if you all the required columns
result <- isi_calculator(example_data, category = c("adipo", "ogtt", "fasting", "tracer_dxa"))
# View the results
print(result)
# use ?example_data to see the sample data column names and description
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.