fitFluMoDL {FluMoDL} | R Documentation |
Fit a FluMoDL object
Description
This function fits a FluMoDL object. This is a distributed lag nonlinear model (DLNM), of quasipoisson family and with log link, which estimates the association between mortality (as outcome) and daily mean temperatures and type-specific influenza incidence proxies (as exposures), adjusted for covariates.
Usage
fitFluMoDL(deaths, temp, dates, proxyH1, proxyH3, proxyB, yearweek,
proxyRSV = NULL, smooth = TRUE, periodic = TRUE)
Arguments
deaths |
A vector of daily deaths, of equal length to argument |
temp |
A vector of daily mean temperatures, of equal length to argument |
dates |
A vector of dates (of class |
proxyH1 |
A vector of weekly influenza A(H1N1)pdm09 incidence proxies, of equal
length to argument |
proxyH3 |
A vector of weekly influenza A(H3N2) incidence proxies, of equal
length to argument |
proxyB |
A vector of weekly influenza B incidence proxies, of equal
length to argument |
yearweek |
An integer vector of weeks, in yyyyww format |
proxyRSV |
An optional vector of weekly RSV incidence proxies, of equal
length to argument |
smooth |
|
periodic |
Should a periodic B-spline term be included in the model?
Defaults to |
Details
Objects of class 'FluMoDL' contain the model, the associated data, estimates of the predicted
associations and other information.
These objects can be further used as input for function attrMort
, to calculate
influenza-attributable and temperature-attributable mortalities for any period in the data
(and any temperature range). Methods print()
, coef()
and vcov()
have
been defined for objects of class 'FluMoDL' (see below),
and also summary()
.
FluMoDL uses a DLNM with the daily number of deaths as the outcome. Covariates include the following:
A
cross-basis matrix
for temperature. The exposure-response relationship is modelled with a quadratic B-spline with internal knots placed at the 10th, 75th and 90th percentile of the temperatures distribution. The lag-response relationship is modelled with a natural cubic spline with three internal knots equidistant in the log scale.Three
cross-basis matrices
for influenza incidence proxies for each type/subtype: A(H1N1)pdm09, A(H3N2) and B. These normally are equal to a sentinel Influenza-Like Illness (ILI) rate, times the laboratory swab samples Percentage Positive ( implying an approximately constant case fatality ratio for each influenza type. The lag-response relationship is specified as above (for temperature).A periodic B-spline term to model seasonality, with three equidistant internal knots according to day of the year. Can optionally be suppressed by setting argument
periodic
toFALSE
.A linear trend, and a factor variable for day of the week.
-
Optionally, a
cross-basis matrix
for an RSV incidence proxy, with specification identical to those for influenza. If given, it will be included in the model and output, and it will be possible to calculate mortality attributable to RSV withattrMort
. This is an experimental feature; it might be removed in the future.
Value
An object of class 'FluMoDL'. This is a list containing the following elements:
- $data
A
data.frame
with the data used to fit the model. Rows correspond to days in argumentdates
. The columns are named:yearweek
,dates
,deaths
,temp
, (for temperature),proxyH1
,proxyH3
,proxyB
,t
(linear trend, with values1:nrow(m$data)
),doy
(day of year, use to calculate the periodic B-spline term to model seasonality) anddow
(day of the week). Also columnproxyRSV
if the relevant argument is provided.- $model
The fitted model; an object of class
glm
and of 'quasipoisson' family with log link.- $basis
A list with names 'temp', 'proxyH1', 'proxyH3' and 'proxyB' (and proxyRSV, if provided in the function arguments), containing the cross-basis matrices that are used as exposures in the model. See
crossbasis
.- $MMP
The Minimum Mortality Point, i.e. the temperature where mortality is lowest.
- $pred
A list with names 'temp', 'proxyH1', 'proxyH3' and 'proxyB' (and 'proxyRSV' if provided in the function arguments), containing predictions (in the form of
crosspred
objects) for each exposure. These can be plotted in both the exposure-response and lag-response dimensions, seecrosspred
,plot.crosspred
and the examples below.- $blup
This element is NULL when creating the object, but can receive a
summary.FluMoDL
object that contains Best Linear Unbiased Predictor (BLUP) coefficients, to be used when estimating attributable mortality. Can be retrieved or set with theblup.FluMoDL
method
Objects of class 'FluMoDL' have methods print()
, coef()
and vcov()
.
coef()
returns a list of numeric vectors, with names 'proxyH1', 'proxyH3'
and 'proxyB' (and 'proxyRSV' if provided in the function arguments), containing the model
coefficients for these cross-basis terms. Similarly vcov()
returns a list
of variance-covariance matrices for the same terms.
References
Lytras T, Pantavou K, Mouratidou E, Tsiodras S. Mortality attributable to seasonal influenza in Greece, 2013 to 2017: variation by type/subtype and age, and a possible harvesting effect. Euro Surveill. 2019;24(14):pii=1800118 (PubMed)
Gasparrini A, Armstrong B, Kenward MG. Distributed lag non-linear models. Stat Med 2010;29(21):2224–34.
Gasparrini A, et al. Mortality risk attributable to high and low ambient temperature: a multicountry observational study. Lancet 2015 Jul 25;386(9991):369–75.
Examples
data(greece) # Use example surveillance data from Greece
m <- with(greece, fitFluMoDL(deaths = daily$deaths,
temp = daily$temp, dates = daily$date,
proxyH1 = weekly$ILI * weekly$ppH1,
proxyH3 = weekly$ILI * weekly$ppH3,
proxyB = weekly$ILI * weekly$ppB,
yearweek = weekly$yearweek))
m
# Plot the association between A(H1N1)pdm09 activity and mortality
# and the overall temperature-mortality association:
plot(m$pred$proxyH1, "overall")
plot(m$pred$temp, "overall")
# Add the Minimum Mortality Point to the plot:
abline(v=m$MMP)
# Check the lag-response dimension for the A(H1N1)pdm09 - mortality
# association, for all proxy values, and for an indicative value of 30.
plot(m$pred$proxyH1) # Produces a 3D plot, see ?plot.crosspred
plot(m$pred$proxyH1, var=30)
# Have a look at the data associated with this FluMoDL:
str(m$data)
tail(m$data)