plotarimapred: Plot ARIMA predictions against actual values

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/plotarimapred.R

Description

The function plots ARIMA predictions against its actual values with prediction intervals.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 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~~

fit.arima

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.

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 xreg argument of the forecast.Arima function in the forecast package.

ylab

A title for the graphic's y-axis. Ignored if NULL. ~~Describe ylab here~~

xlab

A title for the graphic's x-axis. Ignored if NULL. ~~Describe xlab here~~

main

An overall title for the graphic. Ignored if NULL. ~~Describe main here~~

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

1
2
3
4
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))

TSPred documentation built on Jan. 21, 2021, 5:10 p.m.