Parametric
Autoregressiv Process AR(p)
TrendDecomposition.arBurg — Function
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.
TrendDecomposition.arOLS — Function
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.
TrendDecomposition.arYuleWalker — Function
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.
TrendDecomposition.arDurbinLevinson — Function
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.
Moving Average Process MA(p)
TrendDecomposition.MA_NR — Function
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.
ARMA(p, q)
Mixed autoregressive and moving average process ARMA(p, q)
TrendDecomposition.ARMA_NR — Function
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.