gg_fit: Graphical results of forecast models

View source: R/main.R

gg_fitR Documentation

Graphical results of forecast models

Description

Applies a selected forecast model to a time series and plot the fitted series and the forecasted values along with the original series.

Usage

gg_fit(x, test_size, model_name)

Arguments

x

A ts object.

test_size

Integer. The desired length of the test set object to be used to train the model and compare the forecasted with the observed values.

model_name

A string indicating the name of the forecast model.

Value

A ggplot2 object

Examples

gg_fit(AirPassengers, 12, "snaive")

sillasgonzaga/mafs documentation built on Feb. 7, 2025, 12:31 p.m.