This function is built upon forecast. Besides the model predictions, it returns an accuracy measure table (calculated by the accuracy function) and a graph showing the original series, the predicted values and the actual values.
predict(..., actual = NULL, main = "", ylab = "", xlim = NULL,
style = "dygraphs", unnorm = NULL, legend.pos = "topright", knit = F)
A numeric vector
. The actual values (to be compared with predicted values).
A character
. The name of the prediction plot.
A character
. The Y axis label.
A numeric vector
. The limits of the X axis.
A character
. Can be either 'dygraphs' (the dygraph function will be use to make the plot, which is going to be HTML based) or 'normal' (standard R functions will be used to make the plot)
A numeric vector
. If predictions must be unnormalized, set the first element of this vector to the mean and the second, to the standard deviation.
A character
. The position of the legend. Possible values are standard R plot values, i.e., "topright', "bottomleft', etc.
A boolean
. Set this parameter to TRUE
if
Besides the prediction plot, this function returns an object whose fields are:
accuracy
: An object returned by accuracy. It is a table containing several accuracy measures
predictions
: A numeric vector
containing the predicted values.