Learn R Programming

FluMoDL (version 0.0.3)

fitFluMoDL: 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 `dates`

temp

A vector of daily mean temperatures, of equal length to argument `dates`

dates

A vector of dates (of class Date)

proxyH1

A vector of weekly influenza A(H1N1)pdm09 incidence proxies, of equal length to argument `yearweek`

proxyH3

A vector of weekly influenza A(H3N2) incidence proxies, of equal length to argument `yearweek`

proxyB

A vector of weekly influenza B incidence proxies, of equal length to argument `yearweek`

yearweek

An integer vector of weeks, in yyyyww format

proxyRSV

An optional vector of weekly RSV incidence proxies, of equal length to argument `yearweek`. (This is an experimental feature, and this argument might be removed in the future.)

smooth

TRUE (the default) if smoothing is to be applied to the influenza incidence proxies when converting them to a daily series.

periodic

Should a periodic B-spline term be included in the model? Defaults to TRUE.

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 argument dates. The columns are named: yearweek, dates, deaths, temp, (for temperature), proxyH1, proxyH3, proxyB, t (linear trend, with values 1:nrow(m$data)), doy (day of year, use to calculate the periodic B-spline term to model seasonality) and dow (day of the week). Also column proxyRSV 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, see crosspred, 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 the blup.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.

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 to FALSE.

  • 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 with attrMort. This is an experimental feature; it might be removed in the future.

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<U+2013>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<U+2013>75.

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab