plotarimapred {TSPred} | R Documentation |
Plot ARIMA predictions against actual values
Description
The function plots ARIMA predictions against its actual values with prediction intervals.
Usage
plotarimapred(
ts.cont,
fit.arima,
xlim,
range.percent = 0.2,
xreg = NULL,
ylab = NULL,
xlab = NULL,
main = NULL
)
Arguments
ts.cont |
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 |
fit.arima |
A fitted ARIMA model for the time series that is to be
predicted. An object of class " |
xlim |
Numeric vector containing the initial and final limits of the x-axis to be plotted, respectively. |
range.percent |
A percentage which defines how much the range of the graphic's y-axis will be increased from the minimum limits imposed by data. |
xreg |
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 |
ylab |
A title for the graphic's y-axis. Ignored if |
xlab |
A title for the graphic's x-axis. Ignored if |
main |
An overall title for the graphic. Ignored if |
Details
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.
Value
None.
Author(s)
Rebecca Pontes Salles
References
See the forecast.Arima
and the
plot.forecast
functions in the forecast package.
references to the literature/web site here ~
See Also
forecast.Arima
, plot.forecast
,
arimapred
~
Examples
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))