fd: Estimate fractional differencing parameter and/or...

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

View source: R/fd.R

Description

This is a wrapper function for the hurstSpec-function as well as the fracdiff-package for internal use as part of the arfimaMLM function. The function estimates the fractional differencing parameter d of a series x and returns the fractionally differenced series. Alternatively, the differencing parameter can be estimated externally and included as a numeric argument in dval. In this case, the function returns the fractionally differenced series without estimating the differencing parameter itself.

Usage

1
2
3
4
5
6
7
fd(x, dval = "Hurst", ...)

## S3 method for class 'character'
fd(x, dval = "Hurst", ...)

## S3 method for class 'numeric'
fd(x, dval, ...)

Arguments

x

Numeric vector or time series to be fractionally differenced.

dval

Call for a specific estimation method for the fractional differencing parameter in the hurstSpec-function ("Hurst") or the fracdiff-package ("ML", "GPH", or "Sperio"). Default is "Hurst". Alternatively, dval can be a numeric argument that will be directly passed to diffseries to calculate the fractionally differenced series according to the differencing parameter specified in dval. If a value of 0 is specified, the function will simply return the original series x.

...

Further arguments passed to hurstSpec, fracdiff, fdGPH, fdSperio, or diffseries.

Value

series

Fractionally differenciated series.

estimator

Method used to estimate differencing parameter ("Hurst", "ML", "GPH", or "Sperio")), prompts "external" if a differencing parameter was provided as numeric argument for dval.

value

Estimated differencing parameter, returns the dval input if a numeric argument was provided for dval.

Author(s)

Patrick Kraft

References

See those in hurstSpec, fracdiff, fdGPH, fdSperio, and diffseries.

See Also

hurstSpec, fracdiff, fdGPH, fdSperio, diffseries

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
require(fractal)
require(fracdiff)

set.seed(123)
series=fracdiff.sim(100, d=0.4, mu=10)$series

## S3 method for class 'character'
# estimates fractional differencing parameter d
# and differenciates series accordingly
series.fd1<-fd(series)
series.fd2<-fd(series, dval="ML")
series.fd3<-fd(series, dval="GPH")
series.fd4<-fd(series, dval="Sperio")

## S3 method for class 'numeric'
# differenciates series according to 
# externally provided differencing parameter
series.fd5<-fd(series, dval=0.4)

Example output

Loading required package: lme4
Loading required package: Matrix
Loading required package: fractal
Loading required package: splus2R
Loading required package: ifultools
Loading required package: fracdiff

ArfimaMLM documentation built on May 2, 2019, 2:18 a.m.