plot.mbsts: Plotting Functions for Multivariate Bayesian Structural Time...

View source: R/mbsts.plots.R

plot.mbstsR Documentation

Plotting Functions for Multivariate Bayesian Structural Time Series

Description

Functions to plot the results of a model fit using mbsts.

Usage


## S3 method for class 'mbsts'
plot(x, y = c("means", "help"), ...)

PlotMbstsSeriesMeans(mbsts.object,
                     series.id = NULL,
                     same.scale = TRUE,
                     burn = SuggestBurn(.1, mbsts.object),
                     time,
                     show.actuals = TRUE,
                     ylim = NULL,
                     gap = 0,
                     cex.actuals = 0.2,
                     ...)

Arguments

x

An object of class mbsts.

y

A character string indicating the aspect of the model that should be plotted.

mbsts.object

An object of class mbsts.

series.id

Indicates which series should be plotted. An integer, logical, or character vector.

same.scale

Logical. If TRUE then all the series or state components will be plotted with the same scale on the vertical axis. If FALSE then each plot will get its own scale for the vertical axis.

burn

The number of MCMC iterations to discard as burn-in.

time

An optional vector of values to plot against. If missing, the default is to diagnose the time scale of the original time series.

show.actuals

Logical. If TRUE then actual values from the fitted series will be shown on the plot.

ylim

Limits for the vertical axis. If NULL these will be inferred from the state components and the same.scale argument. Otherwise all plots will be created with the same ylim values.

gap

The number of lines to leave between plots. This need not be an integer.

cex.actuals

Scale factor to use for plotting the raw data.

...

Additional arguments passed to PlotDynamicDistribution.

See Also

plot.bsts


bsts documentation built on May 29, 2024, 2:14 a.m.