tempeff {modTempEff}R Documentation

Modelling Temperature Effects on Mortality

Description

Fits the constrained segmented distributed lag log-linear regression model to daily time series data of mortality and temperature and additional confounding factors.

Usage

tempeff(formula, z, data, tcontrol = temp.control(), 
  pcontrol = p.control(), fcontrol = fit.control(), 
  etastart = NULL, ndx.seas = 0, ...)
  

Arguments

formula the model formula including the `response ~ parametric terms', see details.
z the temperature variable.
data the dataset where the variables are stored.
tcontrol a list with components returned by temp.control().
pcontrol a list with components returned by p.control().
fcontrol a list with components returned by fit.control().
etastart possible starting values on the scale of the linear predictor.
ndx.seas possible apparent dimension of the B-spline basis for seasonality (actually the basis size is ndx.seas+3). If ndx.seas=0 no spline for seasonality is assumed.
... additional arguments to be passed to tempeff.fit(); currently unimplemented.

Details

This function fits a log-linear regression model to assess the effects of temperature on mortality. It is assumed that the data are daily time series of mortality (or perhaps morbidity) and temperature. The response and the confounders (such as influenza epidemics or day-of-week) have to be specified in the formula and the temperature itself in specified in the argument z. Long-term trend and seasonality may be modelled via P-splines by specifying the apparent dimension of the relevant basis via the argument ndx.seas.

Value

The function returns an object of class "modTempEff". It is the list returned by gam.fit of package mgcv with the additional components

psi The estimated breakpoint with corresponding standard error (bayesian and frequentist).
betaCold The estimated DL coefficients for the cold effect.
SE.c The frequentist standard errors of the cold DL estimates.
SE.c.bayes The bayesian standard errors of the cold DL estimates.
ToTcold Estimate and frequentist standard error of the total (net) effect of cold.
ToTcold.bayes Estimate and bayesian standard error of the total (net) effect of cold.
edf.cold The df associated at each spline coefficient of the DL curve of cold.
rank.cold The apparent dimension of the B-spline basis of the DL for cold.
betaHeat The estimated DL coefficients for the heat effect.
SE.h The frequentist standard errors of the heat DL estimates.
SE.h.bayes The bayesian standard errors of the heat DL estimates.
ToTheat Estimate and frequentist standard error of the total (net) effect of heat.
ToTheat.bayes Estimate and bayesian standard error of the total (net) effect of heat.
edf.heat The df associated at each spline coefficient of the DL curve of heat.
rank.heat The apparent dimension of the B-spline basis of the DL for heat.
rank.seas When ndx.seas>0, the apparent dimension of the B-spline basis for seasonality.
edf.seas When ndx.seas>0, the df associated at spline coefficients of seasonality.
fit.seas When ndx.seas>0, the fitted long-term trend (on the log scale).

Note

The first 'max(L)' observations are discarded before model fitting.

Author(s)

Vito Muggeo, vito.muggeo@unipa.it

References

Muggeo, V.M.R. (2008) Modeling temperature effects on mortality: multiple segmented relationships with common break points Biostatistics 9, 613–620.

See Also

modTempEff-package, plot.modTempEff, summary.modTempEff, gam.fit in package mgcv

Examples

## Not run: 
library(modTempEff)
data(dataset)
o1<-tempeff(dec1~day+factor(dweek)+factor(year)+factor(month), data=dataset,
      tcontrol = temp.control(psi=20, L=c(60,60)), z=mtemp,
      pcontrol = p.control(ridge.formulas=NA),
      fcontrol = fit.control(display=TRUE))

o2<-update(o1,
  pcontrol=p.control(ridge.formulas=list(cold="xlag^2", heat="xlag^2")))
## End(Not run)

[Package modTempEff version 1.1 Index]