R/AUCg3Measure.R

Defines functions AUCg3Measure

Documented in AUCg3Measure

#' Calculating AUCg for 3 Measures.
#'
#' @param S1  Salivary sample 1.
#' @param S2  Salivary sample 2.
#' @param S3  Salivary sample 3.
#' @param Time1 The time diffrence between S2 and S1.
#' @param Time2 The time diffrence between S3 and S2.

#' @return Vector with the AUCg for measurements.
#' @examples
#' myAUCg <- AUCg3Measure(SalivarySiga$sIgA_c1,SalivarySiga$sIgA_c2,
#' SalivarySiga$sIgA_c3, 45, 30)

AUCg3Measure <- function(S1, S2, S3, Time1, Time2)
{
  ((S2 + S1) * Time1)/2 + ((S3 + S2) * Time2)/2
}
AmirDJV/UsefulFunctions documentation built on Nov. 18, 2017, 5:10 a.m.