plot.varstan: plot methods for varstan models.

Description Usage Arguments Value Examples

View source: R/autoplot.R

Description

Preliminary plot 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

1
2
## S3 method for class 'varstan'
plot(x, prob = 0.95, ...)

Arguments

x

An object of class varstan.

prob

A number p (0 < p < 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.

Value

None. Function produces a ggplot2 graph.

Examples

1
2
3
4
 library(astsa)
 sf1 = auto.sarima(ts = birth,iter = 500,chains = 1)
 # fitted model
 plot(sf1)

bayesforecast documentation built on June 17, 2021, 5:14 p.m.