fitFluMoDL: Fit a FluMoDL object

Description Usage Arguments Details Value References Examples

View source: R/fitFluMoDL.R

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

1
2
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.

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:

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.

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)

thlytras/FluMoDL documentation built on Nov. 5, 2019, 10:06 a.m.