Learn R Programming

bsts (version 0.9.5)

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

Description

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

Usage

# S3 method for 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, ...)

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.

...

Additional arguments passed to PlotDynamicDistribution.

See Also

plot.bsts