R/AUCi3Measure.R

Defines functions AUCi3Measure

Documented in AUCi3Measure

#' Calculating AUCi 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 AUCi for measurements.
#' @examples
#' myAUCi <- AUCi3Measure(SalivarySiga$sIgA_c1,SalivarySiga$sIgA_c2,
#' SalivarySiga$sIgA_c3, 45, 30)

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