% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AUDPS.R
\name{AUDPS}
\alias{AUDPS}
\title{Area under the disease progress stairs}
\usage{
AUDPS(
  time,
  y,
  y_proportion = TRUE,
  type = "absolute",
  aggregate = c("mean", "median", "none")
)
}
\arguments{
\item{time}{A numeric vector of assessment times.}

\item{y}{A numeric vector of disease intensity values.}

\item{y_proportion}{Logical. Are the `y` values expressed as proportions?}

\item{type}{Either `"absolute"` or `"relative"`.}

\item{aggregate}{How to handle multiple observations at the same time point.
The default, `"mean"`, averages replicated observations before calculating
area. `"median"` uses the median and `"none"` requires unique time values.}
}
\value{
A numeric scalar with the AUDPS value.
}
\description{
Calculate the area under the disease progress stairs, an alternative to
AUDPC that gives more balanced weight to the first and last observations.
}
\examples{
epi <- sim_logistic(N = 30, y0 = 0.01, dt = 5, r = 0.3, alpha = 0.5, n = 1)
AUDPS(time = epi$time, y = epi$y, y_proportion = TRUE)

}
\references{
Simko, I., and Piepho, H.-P. (2012). The area under the disease progress
stairs: Calculation, advantage, and application. \emph{Phytopathology},
102, 381-389.
}
