Parametric

Autoregressiv Process AR(p)

TrendDecomposition.arBurgFunction
arBurg(y :: Vector, p :: Int; intercept::Bool = false)

Fits an autoregressive model of order p to time series y using Burg's method.

Returns the tulpe (Φ, σ²), where Φ is the vector of estimated coefficients and σ² is the variance of the error terms.

source
TrendDecomposition.arOLSFunction
arOLS(y :: Vector, p :: Int; intercept::Bool = false)

Fits an autoregressive model of order p to time series y using ordinary least square (OLS).

Returns the tulpe (Φ, σ²), where Φ is the vector of estimated coefficients and σ² is the variance of the error terms.

source
TrendDecomposition.arYuleWalkerFunction
arYuleWalker(y :: Vector, p :: Int)

Fits an autoregressive model of order p to time series y using the Yule-Walker estimators.

Returns the tulpe (Φ, σ²), where Φ is the vector of estimated coefficients and σ² is the variance of the error terms.

source
TrendDecomposition.arDurbinLevinsonFunction
arDurbinLevinson(y :: Vector, p :: Int;
                      intercept::Bool = false, pacf::Bool = false)

Fits an autoregressive model of order p to time series y using the Durbin-Levinson recursion.

Returns the tulpe (Φ, σ²), where Φ is the vector of estimated coefficients and σ² is the variance of the error terms.

source

Moving Average Process MA(p)

TrendDecomposition.MA_NRFunction
MA_NR(y :: Vector; q::Int = 1, iter::Int = 5, α = fill(0.2, q))

Estimates a MA(q) model using the maximum likelihood function and the Newton-Raphson procedure.

Returns a tuple, (α, σ) where α is the vector containing the MA (qx1) coeffients, and σ is the estimated variance.

source

ARMA(p, q)

Mixed autoregressive and moving average process ARMA(p, q)

TrendDecomposition.ARMA_NRFunction
ARMA_NR(y :: Vector; p::Int = 1, q::Int = 1, iter::Int = 5, α = fill(0.4, q), β=[-1.])

Estimates an ARMA(p, q) model using the maximum likelihood function and the Newton-Raphson procedure.

Returns a tuple, (β, α, σ) where β and α are the vectors containing the AR(px1) and MA(qx1) coefficients respectively, and σ is the estimated variance.

source