Description Usage Arguments Details Value References See Also Examples
Compute a baseline from a series through two steps: 1) smoothing and 2) calendar mean.
1 2 |
x |
Numeric vector. Contains data from which the baseline is computed. |
dates |
POSIXt vector the same length as |
nyear |
Integer. Number of years around the current one to consider in the calendar mean step. |
center |
Logical. Is the calendar mean of step 2 centered on current
year? If FALSE (the default), the past |
smoothing.fun |
One of |
... |
Additional arguments to be passed to function chosen in
|
Computes a baseline of expected mortality (or other health issue) to use as a reference to later compute a series of excess mortality. The baseline is computed through two steps:
Smoothing of the series x
;
Computing of a calendar mean, i.e. each day of year of
the baseline is the mean
of the smoothed series at the same day of year for nyear
.
A numeric vector the same length as x
.
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.
excess
to compute excesses from the baseline.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(dlnm)
data(chicagoNMMAPS)
x <- chicagoNMMAPS$death
dates <- as.POSIXlt(chicagoNMMAPS$date)
em <- baseline(x, dates, order = 15)
plot(dates, x)
lines(dates, em, col = "red")
em2 <- baseline(x, dates, smoothing.fun = "spline")
plot(dates, x)
lines(dates, em2, col = "red")
em3 <- baseline(x, dates, nyear = 2, order = 15)
plot(dates, x)
lines(dates, em3, col = "red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.