autoplot.grnnForecast: Create a ggplot object from a grnnForecast object

View source: R/plotting.R

autoplot.grnnForecastR Documentation

Create a ggplot object from a grnnForecast object

Description

It uses an object of class grnnForecast to create a ggplot object that plots a time series and its forecast using GRNN regression.

Usage

## S3 method for class 'grnnForecast'
autoplot(object, ...)

Arguments

object

An object of class grnnForecast.

...

additional parameter, see details.

Details

Commonly used parameters are:

  • highlight. A character string indicating what elements should be highlighted. Possible values are "none" and "points". The default value is "none".

Value

The ggplot object representing a plotting with the forecast.

Examples

pred <- grnn_forecasting(USAccDeaths, h = 12, lags = 1:12, sigma = 50)
library(ggplot2)
autoplot(pred)

tsfgrnn documentation built on March 31, 2023, 8:20 p.m.