autoplot.garma_model | R Documentation |
The ggplot function generates a ggplot of actuals and predicted values for a "garma_model" object. This adds in sensible titles etc as best it can determine.
## S3 method for class 'garma_model'
autoplot(object, h = 24, include_fitted = FALSE, ...)
object |
(garma_model) The garma_model from which to ggplot the values. |
h |
(int) The number of time periods to predict ahead. Default: 24 |
include_fitted |
(bool) whether to include the 1-step ahead 'fitted' values in the plot. Default: FALSE |
... |
other parameters passed to ggplot. |
A ggplot2 "ggplot" object. Note that the standard ggplot2 "+" notation can be used to enhance the default output.
library(ggplot2)
data(AirPassengers)
ap <- as.numeric(diff(AirPassengers, 12))
mdl <- garma(ap, order = c(9, 1, 0), k = 0, method = "CSS", include.mean = FALSE)
autoplot(mdl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.