powered by
Applies a selected forecast model to a time series and plot the fitted series and the forecasted values along with the original series.
gg_fit(x, test_size, model_name)
A ts object.
Integer. The desired length of the test set object to be used to train the model and compare the forecasted with the observed values.
A string indicating the name of the forecast model.
A ggplot2 object
# NOT RUN { gg_fit(AirPassengers, 12, "snaive") # }
Run the code above in your browser using DataLab