plot_cumulative {dlim}R Documentation

Plot Distributed Lag Function

Description

Plot estimated distributed lag function values from a DLIM object, can also compare those of a DLM

Usage

plot_cumulative(
  new_modifiers,
  mod_fit,
  dlm_fit = NULL,
  mod_name = NULL,
  mod_trans = NULL,
  link_trans = NULL
)

Arguments

new_modifiers

a vector of new modifier values for prediction (class "numeric")

mod_fit

DLIM model object (class "dlim")

dlm_fit

a list containing a crossbasis object from the dlnm package as the first element and a DLM model object as the second element (class "list")

mod_name

modifier name (character)

mod_trans

if modifiers are transformed, specify back transformation function (class "character")

link_trans

if family for glm is not Gaussian, specify back transformation to undo link function (class "character")

Value

This function returns a ggplot for cumulative effects, including for a DLM if specified

See Also

dlim

Type vignette('dlimOverview') for a detailed description.


[Package dlim version 0.1.0 Index]