Semiparametric Estimators for Long Memory

Functions to estimate the long memory parameter based on the log-periodogram regression. Estimators include the Geweke and Porter-Hudak estimators and the Whittle estimator.

LongMemory.LogPeriodEstimators.exact_whittle_estMethod
exact_whittle_est(x::Array; m::Real=0.8, l=0, detrend = true)

Estimate the long memory parameter of a time series x using the exact Whittle log-likelihood function. See Shimotsu and Phillips (2005) for details.

Arguments

  • x::Vector: time series
  • m∈(0,1)::Float64: taper final
  • l∈(0,1)::Float64: taper initial
  • detrend::Bool: If true, the time series is demeaned before estimation.

Output

  • d::Float64: long memory parameter

Notes

The function considers the periodogram of the time series x for frequencies in the interval [T^l,T^m]. The zero frequency is always excluded. The condition m < l must hold. The default values of m and l are 0.8 and 0, respectively.

Examples

julia> exact_whittle_est(randn(100,1))
source
LongMemory.LogPeriodEstimators.exact_whittle_est_varianceMethod
exact_whittle_est_variance(x::Array; m::Real=0.8)

Estimate the variance of the estimator for the long memory parameter of a time series x using the exact Whittle log-likelihood function.

Arguments

  • x::Vector: time series

Optional arguments

  • m∈(0,1)::Float64: taper final. Default is 0.8

Output

  • varb::Float64: variance of the estimator

Notes

Multiple dispatch is used for computation. If the first input is an integer, the function interprets it as the sample size; otherwise, it computes the sample size from the length of the time series. The variance is the same as the one from using the Whittle log-likelihood function.

Examples

julia> exact_whittle_est_variance(fi(100,0.4))
source
LongMemory.LogPeriodEstimators.exact_whittle_est_varianceMethod
exact_whittle_est_variance(T::Int; m::Real=0.8)

Estimate the variance of the estimator for the long memory parameter of a time series of length T using the exaxct Whittle log-likelihood function.

Arguments

  • T::Int: length of the time series

Optional arguments

  • m∈(0,1)::Float64: taper final

Output

  • varb::Float64: variance of the estimator. Default is 0.8

Notes

Multiple dispatch is used for computation. If the first input is an integer, the function interprets it as the sample size; otherwise, it computes the sample size from the length of the time series. The variance is the same as the one from using the Whittle log-likelihood function.

Examples

julia> exact_whittle_est_variance(100,0.4)
source
LongMemory.LogPeriodEstimators.exact_whittle_llkMethod
exact_whittle_llk(d, x::Array; m::Real=0.8, l=0)

Compute the exact Whittle log-likelihood function of a time series x for a given long memory parameter d. See Shimotsu and Phillips (2005) for details.

Arguments

  • d::Float64: long memory parameter
  • x::Vector: time series
  • m∈(0,1)::Float64: taper final
  • l∈(0,1)::Float64: taper initial

Output

  • Q::Float64: Whittle log-likelihood function

Notes

The function considers the periodogram of the time series x for frequencies in the interval [T^l,T^m]. The zero frequency is always excluded. The condition m < l must hold. The default values of m and l are 0.8 and 0, respectively. The function demeans the time series x for long memory estimation.

Examples

julia> exact_whittle_llk(0.4,randn(100,1))
source
LongMemory.LogPeriodEstimators.gph_estMethod
gph_est(x::Array; m::Real=0.8, l=0, br=0::Int)

Estimate the long memory parameter of a time series x using the log-periodogram estimator. See Geweke and Porter-Hudak (1983) and Andrews and Guggenberger (2003) for details.

Arguments

  • x::Vector: time series
  • m∈(0,1)::Float64: taper final
  • l∈(0,1)::Float64: taper initial
  • br::Int64: number of bias reduction terms

Output

  • d::Float64: long memory parameter

Notes

The function considers the periodogram of the time series x for frequencies in the interval [T^l,T^m]. The zero frequency is always excluded. The default values of m and l are 0.8 and 0, respectively. The condition m < l must hold.

The default value of br is 0 which returns the original GPH log-periodogram estimator.

Examples

julia> gph_est(randn(100,1))
source
LongMemory.LogPeriodEstimators.gph_est_varianceMethod
gph_est_variance(x::Array; m::Real=0.8, l=0, br=0::Int)

Estimate the variance of the long memory parameter of a time series x using the log-periodogram estimator. See Geweke and Porter-Hudak (1983) and Andrews and Guggenberger (2003) for details.

Arguments

  • x::Vector: time series

Optional arguments

  • m∈(0,1)::Float64: taper final. Default is 0.8
  • br::Int64: number of bias reduction terms

Output

  • varb::Float64: variance of the long memory parameter

Notes

Multiple dispatch is used for computation. If the first input is an integer, the function interprets it as the sample size; otherwise, it computes the sample size from the length of the time series.

Examples

julia> gph_est_variance(fi(100,0.4))
source
LongMemory.LogPeriodEstimators.gph_est_varianceMethod
gph_est_variance(T::Int; m::Real=0.8, l=0, br=0::Int)

Estimate the variance of the long memory parameter of a time series of length T using the log-periodogram estimator. See Geweke and Porter-Hudak (1983) and Andrews and Guggenberger (2003) for details.

Arguments

  • T::Int: length of the time series

Optional arguments

  • m∈(0,1)::Float64: taper final. Default is 0.8
  • br::Int64: number of bias reduction terms

Output

  • varb::Float64: variance of the long memory parameter

Notes

Multiple dispatch is used for computation. If the first input is an integer, the function interprets it as the sample size; otherwise, it computes the sample size from the length of the time series.

Examples

julia> gph_est_variance(100,0.4)
source
LongMemory.LogPeriodEstimators.periodogramMethod
periodogram(x::Array)

Compute the periodogram of a time series x using the fast Fourier transform.

Arguments

  • x::Vector: time series

Output

  • I_w::Vector: periodogram
  • w::Vector: Fourier frequencies

Examples

julia> periodogram(randn(100,1))
source
LongMemory.LogPeriodEstimators.periodogram_plotMethod
periodogram_plot(x::Array; slope::Bool=true)

Plots the log-periodogram of a time series x.

Arguments

  • x::Vector: time series

Output

  • p1::Plots.Plot: log-periodogram

Optional arguments

  • slope::Bool: If true, the slope of the linear regression is displayed.

Examples

julia> periodogram_plot(randn(100,1))
source
LongMemory.LogPeriodEstimators.whittle_estMethod
whittle_est(x::Array; m::Real=0.8, l=0)

Estimate the long memory parameter of a time series x using the Whittle log-likelihood function. See Künsch (1987) for details.

Arguments

  • x::Vector: time series
  • m∈(0,1)::Float64: taper final
  • l∈(0,1)::Float64: taper initial

Output

  • d::Float64: long memory parameter

Notes

The function considers the periodogram of the time series x for frequencies in the interval [T^l,T^m]. The zero frequency is always excluded. The condition m < l must hold. The default values of m and l are 0.8 and 0, respectively.

Examples

julia> whittle_est(randn(100,1))
source
LongMemory.LogPeriodEstimators.whittle_est_varianceMethod
whittle_est_variance(x::Array; m::Real=0.8)

Estimate the variance of the estimator for the long memory parameter of a time series x using the Whittle log-likelihood function. See Künsch (1987) for details.

Arguments

  • x::Vector: time series

Optional arguments

  • m∈(0,1)::Float64: taper final. Default is 0.8

Output

  • varb::Float64: variance of the estimator

Notes

Multiple dispatch is used for computation. If the first input is an integer, the function interprets it as the sample size; otherwise, it computes the sample size from the length of the time series. The variance is the same as the one from using the exact Whittle log-likelihood function.

Examples

julia> whittle_est_variance(fi(100,0.4))
source
LongMemory.LogPeriodEstimators.whittle_est_varianceMethod
whittle_est_variance(T::Int;m::Real=0.8)

Estimate the variance of the estimator for the long memory parameter of a time series of length T using the Whittle log-likelihood function. See Künsch (1987) for details.

Arguments

  • T::Int: length of the time series

Optional arguments

  • m∈(0,1)::Float64: taper final. Default is 0.8

Output

  • varb::Float64: variance of the estimator

Notes

Multiple dispatch is used for computation. If the first input is an integer, the function interprets it as the sample size; otherwise, it computes the sample size from the length of the time series. The variance is the same as the one from using the exact Whittle log-likelihood function.

Examples

julia> whittle_est_variance(100,0.4)
source
LongMemory.LogPeriodEstimators.whittle_llkMethod
whittle_llk(d, x::Array; m::Real=0.8, l=0)

Compute the Whittle log-likelihood function of a time series x for a given long memory parameter d. See Künsch (1987) for details.

Arguments

  • d::Float64: long memory parameter
  • x::Vector: time series
  • m∈(0,1)::Float64: taper final
  • l∈(0,1)::Float64: taper initial

Output

  • Q::Float64: Whittle log-likelihood function

Notes

The function considers the periodogram of the time series x for frequencies in the interval [T^l,T^m]. The zero frequency is always excluded. The condition m < l must hold. The default values of m and l are 0.8 and 0, respectively.

Examples

julia> whittle_llk(0.4,randn(100,1))
source

Documentation for LongMemory.jl.