plot.MCMC_DLM: Visualises Results from MCMC_DLM Fits

View source: R/class_functions.R

plot.MCMC_DLMR Documentation

Visualises Results from MCMC_DLM Fits

Description

Provides some ggplot visualisations of the posterior from MCMC_DLM objects.

Usage

## S3 method for class 'MCMC_DLM'
plot(x, type = "beta", include_intercept = FALSE, print_output = TRUE, ...)

Arguments

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.

Details

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.

Value

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.

Author(s)

Daniel Dempsey (daniel.dempsey0@gmail.com)


DiscreteDLM documentation built on April 3, 2025, 6:19 p.m.