Learn R Programming

bayesforecast (version 1.0.5)

autoplot.varstan: autoplot methods for varstan models.

Description

Preliminary autoplot methods for varstan models only valid for univariate time series models. The function prints the fitted values time series, the trace and density plots for the sampled model parameters, or the residuals' posterior mean time series.

Usage

# S3 method for varstan
autoplot(object, prob = 0.95, ...)

Value

None. Function produces a ggplot2 graph.

Arguments

object

An object of class varstan.

prob

A number \(p \in (0,1)\) indicating the desired probability mass to include in the intervals. The default is to report 90% intervals (prob=0.9) rather than the traditionally used 95%.

...

Further arguments passed to mcmc_combo.

Examples

Run this code
# \donttest{
 sf1 = auto.sarima(ts = birth,iter = 500,chains = 1)
 # fitted model
 autoplot(sf1)
# }

Run the code above in your browser using DataLab