Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

arfima

Fit a fractionally differenced ARFIMA model


Description

An ARFIMA(p,d,q) model is selected and estimated automatically using the Hyndman-Khandakar (2008) algorithm to select p and q and the Haslett and Raftery (1989) algorithm to estimate the parameters including d.

Usage

arfima(
  y,
  drange = c(0, 0.5),
  estim = c("mle", "ls"),
  model = NULL,
  lambda = NULL,
  biasadj = FALSE,
  x = y,
  ...
)

Arguments

y

a univariate time series (numeric vector).

drange

Allowable values of d to be considered. Default of c(0,0.5) ensures a stationary model is returned.

estim

If estim=="ls", then the ARMA parameters are calculated using the Haslett-Raftery algorithm. If estim=="mle", then the ARMA parameters are calculated using full MLE via the arima function.

model

Output from a previous call to arfima. If model is passed, this same model is fitted to y without re-estimating any parameters.

lambda

Box-Cox transformation parameter. If lambda="auto", then a transformation is automatically selected using BoxCox.lambda. The transformation is ignored if NULL. Otherwise, data transformed before model is estimated.

biasadj

Use adjusted back-transformed mean for Box-Cox transformations. If transformed data is used to produce forecasts and fitted values, a regular back transformation will result in median forecasts. If biasadj is TRUE, an adjustment will be made to produce mean forecasts and fitted values.

x

Deprecated. Included for backwards compatibility.

...

Other arguments passed to auto.arima when selecting p and q.

Details

This function combines fracdiff and auto.arima to automatically select and estimate an ARFIMA model. The fractional differencing parameter is chosen first assuming an ARFIMA(2,d,0) model. Then the data are fractionally differenced using the estimated d and an ARMA model is selected for the resulting time series using auto.arima. Finally, the full ARFIMA(p,d,q) model is re-estimated using fracdiff. If estim=="mle", the ARMA coefficients are refined using arima.

Value

A list object of S3 class "fracdiff", which is described in the fracdiff documentation. A few additional objects are added to the list including x (the original time series), and the residuals and fitted values.

Author(s)

Rob J Hyndman and Farah Yasmeen

References

J. Haslett and A. E. Raftery (1989) Space-time Modelling with Long-memory Dependence: Assessing Ireland's Wind Power Resource (with discussion); Applied Statistics 38, 1-50.

Hyndman, R.J. and Khandakar, Y. (2008) "Automatic time series forecasting: The forecast package for R", Journal of Statistical Software, 26(3).

See Also

Examples

library(fracdiff)
x <- fracdiff.sim( 100, ma=-.4, d=.3)$series
fit <- arfima(x)
tsdisplay(residuals(fit))

forecast

Forecasting Functions for Time Series and Linear Models

v8.14
GPL-3
Authors
Rob Hyndman [aut, cre, cph] (<https://orcid.org/0000-0002-2140-5352>), George Athanasopoulos [aut], Christoph Bergmeir [aut] (<https://orcid.org/0000-0002-3665-9021>), Gabriel Caceres [aut], Leanne Chhay [aut], Mitchell O'Hara-Wild [aut] (<https://orcid.org/0000-0001-6729-7695>), Fotios Petropoulos [aut] (<https://orcid.org/0000-0003-3039-4955>), Slava Razbash [aut], Earo Wang [aut], Farah Yasmeen [aut] (<https://orcid.org/0000-0002-1479-5401>), R Core Team [ctb, cph], Ross Ihaka [ctb, cph], Daniel Reid [ctb], David Shaub [ctb], Yuan Tang [ctb] (<https://orcid.org/0000-0001-5243-233X>), Zhenyu Zhou [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.