bsts
prediction object.# S3 method for bsts.prediction
plot(x,
y = NULL,
burn = 0,
plot.original = TRUE,
median.color = "blue",
median.type = 1,
median.width = 3,
interval.quantiles = c(.025, .975),
interval.color = "green",
interval.type = 2,
interval.width = 2,
style = c("dynamic", "boxplot"),
ylim = NULL,
...)
bsts.prediction
created by calling predict
on a bsts
object.plot
generic function. This argument is unused.TRUE
then the
prediction is plotted after a time series plot of the original
series. If FALSE
, the prediction fills the entire plot.
If numeric, then it specifies the number of trailing observations
of the original time series to plot in addition to the
predictions.predict.bsts
.PlotDynamicDistribution
and lines
.x
using a dynamic distribution plot generated by
PlotDynamicDistribution
. Overlays the
posterior median and 95% prediction limits for the predictive
distribution.bsts
PlotDynamicDistribution
plot.lm.spike
data(AirPassengers)
y <- log(AirPassengers)
ss <- AddLocalLinearTrend(list(), y)
ss <- AddSeasonal(ss, y, nseasons = 12)
model <- bsts(y, state.specification = ss, niter = 500)
pred <- predict(model, horizon = 12, burn = 100)
plot(pred)
Run the code above in your browser using DataLab