#' Title
#'
#' @param glu An ordered vector of glucose values.
#' @param ins An ordered vector of insulin values.
#' @param body_weight Body weight in kg.
#'
#' @return A double.
#'
#' @examples
gutt_index <- function(glu, ins, body_weight) {
stopifnot(length(glu) == 2 && length(ins) == 2 && length(body_weight) == 1)
# glucose uptake rate in peripheral tissues
m <- (75000 + ((glu[1] - glu[2]) * 0.19 * body_weight[1])) / 120
# metabolic clearance rate
mcr <- m / mean(glu)
# insulin sensitivity index
mcr / log(mean(ins))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.