Calculate the area under a disease progress curve using the trapezoidal method.
Usage
AUDPC(
time,
y,
y_proportion = TRUE,
type = "absolute",
aggregate = c("mean", "median", "none")
)Arguments
- time
A numeric vector of assessment times.
- y
A numeric vector of disease intensity values.
- y_proportion
Logical. Are the `y` values expressed as proportions?
- type
Either `"absolute"` or `"relative"`.
- 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.
References
Madden, L. V., Hughes, G., and van den Bosch, F. (2007). The Study of Plant Disease Epidemics. American Phytopathological Society.
Examples
epi <- sim_logistic(N = 30, y0 = 0.01, dt = 5, r = 0.3, alpha = 0.5, n = 1)
AUDPC(time = epi$time, y = epi$y, y_proportion = TRUE)
#> [1] 14.79107
