plot.modTempEff {modTempEff}R Documentation

Plot method for the class 'modTempEff'

Description

Plots distributed lags curves from the modTempEff fit.

Usage

## S3 method for class 'modTempEff':
plot(x, which = c("cold", "heat"), add=FALSE, new=TRUE, 
  var.bayes = FALSE, delta.rr = TRUE, level = 0.95, ...)

Arguments

x object of class "modTempEff".
which Which DL curve should be plotted? for cold, heat or both of them (default).
add logical; if TRUE the fitted DL curve for cold or heat is added to an existing plot.
new logical indicating if a new device should be opened. If add=TRUE, new is set to FALSE.
var.bayes logical indicating if the 'Bayesian' rather than the frequentist standard errors should be employed to compute the pointwise confidence intervals to be plotted
delta.rr logical indicating if the DL curves should be plotted on the log scale or as per cent change in relative risk, i.e. 100*(exp(.)-1).
level the selected confidence level of the pointwise confidence intervals to be plotted
... additional arguments..

Details

Takes a fitted "modTempEff" object produced by tempeff() and plots the DL curves for cold and heat effect with relevant pointwise confidence intervals. plot.modTempEff also works with objects with fixed (not estimated) breakpoint, namely fits returned by

tempeff(.., fcontrol=fit.control(it.max=0)).

Note add=TRUE makes sense (and works) only for a single (cold or heat) DL curve to be superimposed to an existing plot.

Value

The function simply plots the required estimated DL curve. If the fitted model includes only a smooth term for the long term trend, plot.modTempEff draws it.

Author(s)

Vito Muggeo

See Also

tempeff

Examples

  ## Not run: 
  #obj is an object returned by tempeff()
  #plots DL curves for cold and heat with 95% pointwise CI
  # using frequentist standard errors
  plot(obj)
  
  #plots the estimated DL curve only for heat with 90% pointwise CI
  # using bayesian standard errors
  plot(obj, "heat", var.bayes=TRUE, level=.90)
  
## End(Not run)
  

[Package modTempEff version 1.5 Index]