Spectral Analysis
Spectral Density AR(p) process
TrendDecomposition.arSpectrum — Function
arSpectrum(Φ :: Vector, σ::Float64; T = 200)Computes the spectral density of a p-th order autoregressive process, given the parameter vector Φ and the variance σ for an equivalence of a time series length of T.
arSpectrum(y :: Vector; p::Int = 3, method=:burg)Computes the spectral density of a p-th order autoregressive process; first the method given (:burg, :ols, :yuleWalker, :durbinLevinson) is used to estimate the parameters for the time series y and in the second step the spectral density is computed.
Periodogram
TrendDecomposition.periodogram — Function
periodogram(Y :: Vector; trunc::Int=-1)Estimates the spectral density function of a process Y with discrete spectra.
As estimation procedure the discrete fourier transform of the sample autocovariance is used. A truncation point can be given with trunc, so that a truncated periodogram is estimated.
Returns a tulpe (ω, spectra), where ω is the vector of frequency the periodogram ordinates (spectra) are estimated for.