| Title: | Insulin Sensitivity Indices Calculator |
|---|---|
| Description: | Facilitates the calculation of 40 different insulin sensitivity indices based on fasting, oral glucose tolerance test (OGTT), lipid (adipose), tracer (palmitate and glycerol rate), and DXA (fat mass) measurement values. Enables easy and accurate assessment of insulin sensitivity, critical for understanding and managing metabolic disorders like diabetes and obesity. Indices calculated are described in Gastaldelli (2022) <doi:10.1002/oby.23503> and Lorenzo (2010) <doi:10.1210/jc.2010-1144>. |
| Authors: | Sufyan Suleman [aut, cre] |
| Maintainer: | Sufyan Suleman <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-10 15:07:57 UTC |
| Source: | https://github.com/sufyansuleman/insusenscalc |
Names, description and units (where needed) of the variables. Name of the variables in the input data should be the same as the ones listed below for accurately calculating the indices. Otherwise it will result in Error. If a variable is missing for the category it will not calculate the any of the index for that category. This can be handled by creating the variable column with NA values If the values are missing for a variable it will set the value to NA and calculate the remaining indices and return the NA value for the missing variable.
example_dataexample_data
A data frame with rows (number of observations) and 17 columns (variables, can vary for every data):
numeric Age of the individual (years)
factor Sex of the individual (1 for male, 2/0 for female)
numeric Fasting insulin level (pmol/L)
numeric Fasting glucose level (mmol/L)
numeric Insulin level at 30 minutes (pmol/L)
numeric Glucose level at 30 minutes (mmol/L)
numeric Insulin level at 120 minutes (pmol/L)
numeric Glucose level at 120 minutes (mmol/L)
numeric HDL cholesterol level (mmol/L)
numeric Free fatty acid level (mmol/L)
numeric Waist circumference of the individual (cm)
numeric Weight of the individual (kg)
numeric Body mass index of the individual (kg/m^2)
numeric Triacylglycerides level (mmol/L)
numeric Rate of palmitate (arbitrary units)
numeric Rate of glycerol (arbitrary units)
numeric Fat mass of the individual (kg)
Data is a simulated dataset for illustrative purposes.
Calculates surrogate insulin sensitivity indices based on fasting, OGTT, and lipid (adipo) values values.
isi_calculator(data, category = c("fasting", "ogtt", "adipo", "tracer_dxa"))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 microU/ml using the formula value / 6.
Triglycerides: Converts from mmol/L to mg/dL using the formula value * 88.57.
HDL cholesterol: Converts from mmol/L to mg/dL using the formula value * 38.67.
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 descriptiondata(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