Select best fitting ARFIMA models based on information criteria.
autoarfima(data, ar.max = 2, ma.max = 2, criterion = c("AIC","BIC","SIC","HQIC"),
method = c("partial", "full"), arfima = FALSE, include.mean = NULL,
distribution.model = "norm", cluster = NULL, external.regressors = NULL,
solver = "solnp", solver.control=list(), fit.control=list(), return.all = FALSE)
A list with the following items:
Either the best fitted model or all the fitted models if the option ‘return.all’ was selected.
Either a sorted matrix of the models and their information criterion, else an unsorted matrix of the models and their information criterion if the option ‘return.all’ was selected.
A univariate data object. Can be a numeric vector, matrix, data.frame, zoo, xts, timeSeries, ts or irts object.
Maximum AR order to test for.
Maximum MA order to test for.
Information Criterion to use for selecting the best model.
The partial method tests combinations of consecutive orders of AR and MA i.e. 1:2, 1:3 etc, while the full method tests all possible combinations within the consecutive orders thus enumerating the complete combination space of the MA and AR orders. .
Can be TRUE, FALSE or NULL in which case it is tested.
Can be TRUE, FALSE or NULL in which case it is tested.
A cluster object created by calling makeCluster
from the parallel
package. If it is not NULL, then this will be used for parallel estimation.
A matrix object containing the external regressors to include in the mean equation with as many rows as will be included in the data (which is passed in the fit function).
The distribution density to use for the innovations (defaults to Normal).
One of either “nlminb”, “solnp”, “gosolnp” or “nloptr”.
Control arguments list passed to optimizer.
Control arguments passed to the fitting routine.
Whether to return all the fitted models or only the best one.
Alexios Ghalanos
if (FALSE) {
data(sp500ret)
fit = autoarfima(data = sp500ret[1:1000,], ar.max = 2, ma.max = 2,
criterion = "AIC", method = "full")
}
Run the code above in your browser using DataLab