Plot Time-varying Regression Coefficients of a Dynamite Model
Usage
plot_deltas(
x,
parameters = NULL,
responses = NULL,
level = 0.05,
alpha = 0.5,
scales = c("fixed", "free"),
include_alpha = TRUE
)
Arguments
- x
[
dynamitefit
]
The model fit object- parameters
[
charecter()
]\ Parameter name(s) for which the plots should be drawn. Possible options can be found with functionget_parameter_names(types = "delta")
.- responses
[
character()
]
Response(s) for which the coefficients should be drawn. Possible options are elements ofunique(x$priors$response)
, and the default is this whole vector.- level
[
numeric(1)
]
Level for posterior intervals. Default is 0.05, leading to 90% intervals.- alpha
[
numeric(1)
]
Opacity level forgeom_ribbon
. Default is 0.5.- scales
[
character(1)
] Should y-axis of the panels be"fixed"
(the default) or"free"
? Seeggplot2::facet_wrap()
.- include_alpha
[
logical(1)
]
IfTRUE
(default), plots also the time-varying alphas if such parameters exists in the model.
See also
Drawing plots
plot.dynamitefit()
,
plot.dynamiteformula()
,
plot_betas()
,
plot_lambdas()
,
plot_nus()
,
plot_psis()
Examples
data.table::setDTthreads(1) # For CRAN
plot_deltas(gaussian_example_fit, level = 0.025, scales = "free") +
ggplot2::theme_minimal()