The function plots ARIMA predictions against its actual values with prediction intervals.
plotarimapred(
ts.cont,
fit.arima,
xlim,
range.percent = 0.2,
xreg = NULL,
ylab = NULL,
xlab = NULL,
main = NULL
)None.
A vector or univariate time series containing actual values
for a time series that are to be plotted against its respective predictions.
The number of consecutive values to be predicted is assumed to be equal to
the number of rows in ts.cont. If xreg is used, the number of
values to be predicted is set to the number of rows of xreg.
~~Describe ts.cont here~~
A fitted ARIMA model for the time series that is to be
predicted. An object of class "Arima", "ar" or
"fracdiff". See the object argument of the
forecast.Arima function in the forecast package.
Numeric vector containing the initial and final limits of the x-axis to be plotted, respectively.
A percentage which defines how much the range of the graphic's y-axis will be increased from the minimum limits imposed by data.
A vector, matrix, data frame or times series with new values of
external regressors to be used for prediction (for class Arima objects
only). See the xreg argument of the forecast.Arima
function in the forecast package.
A title for the graphic's y-axis. Ignored if NULL.
~~Describe ylab here~~
A title for the graphic's x-axis. Ignored if NULL.
~~Describe xlab here~~
An overall title for the graphic. Ignored if NULL.
~~Describe main here~~
Rebecca Pontes Salles
The model in fit.arima is used for prediction by the
forecast.Arima function in the forecast package. The
resulting forecast object is then used for plotting the predictions
and their intervals by the plot.forecast function also in the
forecast package. For more details, see the
forecast.Arima and the plot.forecast functions
in the forecast package.
See the forecast.Arima and the
plot.forecast functions in the forecast package.
references to the literature/web site here ~
forecast.Arima, plot.forecast,
arimapred ~
data(SantaFe.A,SantaFe.A.cont)
fit <- forecast::auto.arima(SantaFe.A)
ts.cont <- ts(SantaFe.A.cont,start=1001)
plotarimapred(ts.cont, fit, xlim=c(1001,1100))
Run the code above in your browser using DataLab