arfima(x, drange=c(0, 0.5), estim=c("mle","ls"), lambda=NULL, ...)c(0,0.5) ensures a stationary model is returned.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 arimaauto.arima when selecting p and q."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.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.fracdiff, auto.arima, forecast.fracdiff.x <- fracdiff.sim( 100, ma=-.4, d=.3)$series
fit <- arfima(x)
tsdisplay(residuals(fit))Run the code above in your browser using DataLab