plot_DLF {dlim}R Documentation

Plot Cumulative Effects

Description

Plot estimated cumulative effects from a DLIM object, can also compare estimated cumulative effects between a DLM and DLIM

Usage

plot_DLF(
  new_modifiers,
  mod_fit,
  mod_name,
  dlm_fit = NULL,
  plot_by,
  time_pts = 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")

mod_name

modifier name that follows variable name nomenclature (class "character")

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")

plot_by

choose to create plots for particular modifier values, "modifier", or particular time points, "time", (class "character")

time_pts

a set of time points if plotting by time (class "numeric")

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 point-wise effects isolated by either time points or modifier, including a DLM if specified

See Also

dlim

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


[Package dlim version 0.1.0 Index]