Description Usage Arguments Value References Examples
Extract episodes of extreme above a given threshold, possibly including several days before and after the excess.
1 2 |
x |
Numeric vector containing the data from which the extremes are to be extracted. |
u |
Numeric value giving the threshold above which values of |
type |
One of |
trend |
Numeric value or vector indicating an optional trend for the
threshold. Can be a scalar value for linear trends, or a vector the same
length as |
l |
Integer. An episode is taken as the day(s) exceeding |
r |
Positive integer. Number of consecutive values below threshold following an excess to end the episode. |
covariates |
Numeric matrix. Covariates to for additional contraints on the extracted episodes. |
uc |
Numeric vector. Thresholds for covariates. Extremes of |
A data.frame object containing the indices, values,
episode number of all episodes found, and a logical indicating
if the day is one of the extremes (useful when l > 0
).
In addition, contains the attribute
threshold
which gives he threshold for each value of x
for plotting, as well as r
, l
and uc
that contains
values of the corresponding parameters used to extract episodes.
Chebana F., Martel B., Gosselin P., Giroux J.X., Ouarda T.B.M.J., 2013. A general and flexible methodology to define thresholds for heat health watch and warning systems, applied to the province of Quebec (Canada). International journal of biometeorology 57, 631-644.
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(dlnm)
data(chicagoNMMAPS)
x <- chicagoNMMAPS$death
dates <- as.POSIXlt(chicagoNMMAPS$date)
n <- nrow(chicagoNMMAPS)
# Compute over-mortality
om <- excess(x, dates = dates, order = 15)
# Extract all days for which om is above 40%
epis <- episodes(om, u = 40)
# Show the corresponding dates
dates[epis$t]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.