marimapred: Multiple time series automatic ARIMA fitting and prediction

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

View source: R/marimapred.R

Description

The function predicts and returns the next n consecutive values of a set of time series using automatically fitted ARIMA models. Based on multiple application of the arimapred function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
marimapred(
  TimeSeries,
  TimeSeriesCont = NULL,
  n.ahead = NULL,
  na.action = stats::na.omit,
  xreg = NULL,
  newxreg = NULL,
  se.fit = FALSE,
  plot = FALSE,
  range.p = 0.2,
  ylab = NULL,
  xlab = NULL,
  main = NULL
)

Arguments

TimeSeries

A vector, matrix, or data frame which contains a set of time series used for fitting ARIMA models. Each column corresponds to one time series.

TimeSeriesCont

A vector, matrix, or data frame containing continuation points for TimeSeries with actual values. Each column corresponds to one time series. Ignored if NULL.

n.ahead

A numeric vector (or a single numeric value) with the number of consecutive values which are to be predicted of each respective time series in TimeSeries. If n.ahead is NULL, the number of values to be predicted of each time series in TimeSeries is assumed to be equal to the number of rows in each respective time series in TimeSeriesCont. Required when TimeSeriesCont is NULL.

na.action

A function for treating missing values in TimeSeries and TimeSeriesCont. The default function is na.omit, which omits any missing values found in TimeSeries or TimeSeriesCont.

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 TimeSeries and therefore must have the same number of rows as this respective time series. This is also valid for the second component, and so forth. Ignored if NULL.

newxreg

A list of vectors, matrices, data frames or times series with new values of xreg to be used for prediction. The first component of the list must have at least the same number of rows as the respective first value in n.ahead or, if n.ahead is NULL, the number of continuation points in the respective first time series in TimeSeriesCont. This is also valid for the second component, and so forth. Ignored if NULL.

se.fit

If se.fit is TRUE, the standard errors of the predictions are returned.

plot

A Boolean parameter which defines whether the function arimapred will generate a graphic. If plot is TRUE, graphics will be generated for each time series in TimeSeries.

range.p

A percentage which defines how much the range of the graphics' y-axis will be increased from the minimum limits imposed by data.

ylab

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

xlab

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

main

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

Details

See the arimapred function.

Value

A vector of time series of predictions, if the number of consecutive values predicted of each time series in TimeSeries is the same, otherwise a list of time series of predictions.

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

See the arimapred function. the literature/web site here ~

See Also

arimapred ~

Examples

1
2

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