arimainterp {TSPred} | R Documentation |
Interpolation of unknown values using automatic ARIMA fitting and prediction
Description
The function predicts nonconsecutive blocks of N unknown values of a single
time series using the arimapred
function and an interpolation
approach.
Usage
arimainterp(
TimeSeries,
n.ahead,
extrap = TRUE,
xreg = NULL,
newxreg = NULL,
se.fit = FALSE
)
Arguments
TimeSeries |
A matrix, or data frame which contains a set of time
series used for fitting ARIMA models. Each column corresponds to one time
series. Each time series in |
n.ahead |
A numeric value (N) with the number of consecutive unknown
values of each block which is to be predicted of |
extrap |
A Boolean parameter which defines whether one of the blocks of
N unknown values to be predicted follows the last sequence of known values
in |
xreg |
A list of vectors, matrices, data frames or times series of
external regressors used for fitting the ARIMA models. The first component
of the list contains external regressors for the first time series in
|
newxreg |
A list of vectors, matrices, data frames or times series with
further values of |
se.fit |
If |
Details
In order to avoid error accumulation, when possible, the function provides
the separate prediction of each half of the blocks of unknown values using
their past and future known values, respectively. If extrap
is
TRUE
, this strategy is not possible for the last of the blocks of
unknown values, for whose prediction the function uses only its past values.
By default the function omits any missing values found in TimeSeries
.
Value
A vector of time series of predictions, or if se.fit
is
TRUE
, a vector of lists, each one with the components pred
,
the predictions, and se
, the estimated standard errors. Both
components are time series. See the predict.Arima
function in
the stats package and the function arimapred
.
Author(s)
Rebecca Pontes Salles
References
H. Cheng, P.-N. Tan, J. Gao, and J. Scripps, 2006, "Multistep-Ahead Time Series Prediction", In: W.-K. Ng, M. Kitsuregawa, J. Li, and K. Chang, eds., Advances in Knowledge Discovery and Data Mining, Springer Berlin Heidelberg, p. 765-774.
See Also
Examples
data(CATS)
arimainterp(CATS[,c(2:3)],n.ahead=20,extrap=TRUE)