Method for fitting an ARFIMA models.
arfimafit(spec, data, out.sample = 0, solver = "solnp", solver.control = list(),
fit.control = list(fixed.se = 0, scale = 0), numderiv.control = list(grad.eps=1e-4,
grad.d=0.0001, grad.zero.tol=sqrt(.Machine$double.eps/7e-7), hess.eps=1e-4, hess.d=0.1,
hess.zero.tol=sqrt(.Machine$double.eps/7e-7), r=4, v=2), ...)
A ARFIMAfit
object containing details of the ARFIMA fit.
A univariate data object. Can be a numeric vector, matrix, data.frame, zoo, xts, timeSeries, ts or irts object.
An ARFIMA spec object of class ARFIMAspec
.
A positive integer indicating the number of periods before the last to keep for out of sample forecasting (see details).
One of either “nlminb”, “solnp”, “gosolnp” or “nloptr”.
Control arguments list passed to optimizer.
Control arguments passed to the fitting routine. The
fixed.se argument controls whether standard errors should be calculated for
those parameters which were fixed (through the fixed.pars argument of the
arfimaspec function). The scale parameter controls whether the
data should be scaled before being submitted to the optimizer.
Control arguments passed to the numerical routines for the calculation of the standard errors. See the documentation in the numDeriv package for further details. The arguments which start with ‘hess’ are passed to the hessian routine while those with ‘grad’ to the jacobian routine.
.
Alexios Ghalanos
The ARFIMA optimization routine first calculates a set of feasible starting
points which are used to initiate the ARFIMA Maximum Likelihood recursion. The
main part of the likelihood calculation is performed in C-code for speed.
The out.sample option is provided in order to carry out forecast performance
testing against actual data. A minimum of 5 data points are required for these
tests. If the out.sample option is positive, then the routine will fit only
N - out.sample (where N is the total data length) data points, leaving
out.sample points for forecasting and testing using the forecast performance
measures. In the arfimaforecast
routine the
n.ahead may also be greater than the out.sample number resulting in a
combination of out of sample data points matched against actual data and some
without, which the forecast performance tests will ignore.
The “gosolnp” solver allows for the initialization of multiple restarts
of the solnp solver with randomly generated parameters (see documentation in
the Rsolnp-package for details of the strategy used). The solver.control list
then accepts the following additional (to the solnp) arguments: “n.restarts”
is the number of solver restarts required (defaults to 1), “parallel” (logical),
“pkg” (either snowfall or multicore) and “cores” (the number of cores
or workers to use) for use of parallel functionality, “rseed” is the seed to initialize
the random number generator, and “n.sim” is the number of simulated
parameter vectors to generate per n.restarts.