View source: R/class_functions.R
plot.MCMC_DLM | R Documentation |
Provides some ggplot visualisations of the posterior from MCMC_DLM objects.
## S3 method for class 'MCMC_DLM'
plot(x, type = "beta", include_intercept = FALSE, print_output = TRUE, ...)
x |
An MCMC_DLM object. |
type |
One of "beta", "gamma", "xi", or "lags". Partial matching is supported. See Details below. |
include_intercept |
Logical indicating if the intercept should be included in the graphs. |
print_output |
Logical indicating whether or not the ggplot objects should be printed to the screen. |
... |
Extra arguments; currently unused. |
The type of plot generated is determined by the type argument. The options are:
beta: A ridgeplot of the regression slopes,
gamma: A bar chart of the mean probability of inclusion,
xi: A kernel density estimate plot of the negative binomial stopping parameter (of course, this only works for negative binomial regression fits),
lags: A collection of plots (supplied in a list), each containing a line chart of the lag-response for each dynamic variable.
A ggplot object, except when type = 'lags', in which case it will be a list of ggplot objects. Will display the ggplot visual if print_output = TRUE.
Daniel Dempsey (daniel.dempsey0@gmail.com)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.