Estimation
MessyTimeSeriesOptim
provides a generic ECM algorithm easily adaptable to any model that can be written in a linear state-space form. This algorithm is also compatible with penalised maximum likelihood and penalised quasi maximum likelihood estimation.
MessyTimeSeriesOptim.DFMSettings
MessyTimeSeriesOptim.VARSettings
MessyTimeSeriesOptim.VMASettings
MessyTimeSeriesOptim.ecm
ECM algorithm
MessyTimeSeriesOptim.ecm
— Functionecm(estim::EstimSettings)
Run the ECM algorithm in Pellegrino (2022).
Arguments
estim
: settings used for the estimationoutput_sspace_data
: Optional argument. If specified, it is used as the output state space data. Otherwise, estim.Y is used instead.
References
Pellegrino (2022)
EstimSettings
MessyTimeSeriesOptim
provides the following EstimSettings subtypes.
Dynamic factor models
MessyTimeSeriesOptim.DFMSettings
— TypeDFMSettings(...)
Define an immutable structure used to initialise the estimation routine for a DFM.
Arguments
Y
: observed measurements (nxT
)n
: Number of seriesT
: Number of observationslags
: Order of the autoregressive polynomial of each common cyclen_trends
: Number of trendsn_drifts
: Number of driftsn_cycles
: Number of cyclesn_non_stationary
: ntrends + ndriftsm
: nnonstationary + n_cycles*lags + ntrends_skeleton
: The basic structure for the trends loadings (or nothing)cycles_skeleton
: The basic structure for the cycles loadings (or nothing)drifts_selection
: BitArray{1} identifying which trend has a drift to estimate (or nothing)trends_free_params
: BitArray{2} identifying the trend loadings to estimate (or nothing)cycles_free_params
: BitArray{2} identifying the cycle loadings to estimate (or nothing)λ
: overall shrinkage hyper-parameter for the elastic-net penaltyα
: weight associated to the LASSO component of the elastic-net penaltyβ
: additional shrinkage for distant lags (p>1)Γ
: Diagonal matrix used to input the hyperparameters in the penalty computation for the common cyclesΓ_idio
: Diagonal matrix used to input the hyperparameters in the penalty computation for the idiosyncratic cyclesΓ_extended
: Diagonal matrix used to input the hyperparameters in the estimationε
: Small number (default: 1e-4)tol
: tolerance used to check convergence (default: 1e-4)max_iter
: maximum number of iterations for the estimation algorithm (default: 1000)prerun
: number of iterations prior the actual estimation algorithm (default: 2)check_quantile
: check the quantile of the relative change of the parameters for convergence purposes (default: false)verb
: Verbose output (default: true)
Vector autoregressions
MessyTimeSeriesOptim.VARSettings
— TypeVARSettings(...)
Define an immutable structure used to initialise the estimation routine for VAR(q) models.
Arguments
Y
: observed measurements (nxT
)n
: Number of seriesT
: Number of observationsq
: Order of the autoregressive polynomialnq
: n*qm
: n*qλ
: overall shrinkage hyper-parameter for the elastic-net penaltyα
: weight associated to the LASSO component of the elastic-net penaltyβ
: additional shrinkage for distant lags (p>1)Γ
: Diagonal matrix used to input the hyperparameters in the estimation - see Pellegrino (2022) for detailsε
: Small number (default: 1e-4)tol
: tolerance used to check convergence (default: 1e-4)max_iter
: maximum number of iterations for the estimation algorithm (default: 1000)prerun
: number of iterations prior the actual estimation algorithm (default: 2)check_quantile
: check the quantile of the relative change of the parameters for convergence purposes (default: false)verb
: Verbose output (default: true)
Vector moving averages
MessyTimeSeriesOptim.VMASettings
— TypeVMASettings(...)
Define an immutable structure used to initialise the estimation routine for VMA(r) models.
Arguments
Y
: observed measurements (nxT
)n
: Number of seriesT
: Number of observationsr
: Order of the moving average polynomialnr
: n*rm
: nr+n*1_{q=0}λ
: overall shrinkage hyper-parameter for the elastic-net penaltyα
: weight associated to the LASSO component of the elastic-net penaltyβ
: additional shrinkage for distant lags (p>1)Γ
: Diagonal matrix used to input the hyperparameters in the estimation - see Pellegrino (2022) for detailsε
: Small number (default: 1e-4)tol
: tolerance used to check convergence (default: 1e-4)max_iter
: maximum number of iterations for the estimation algorithm (default: 1000)prerun
: number of iterations prior the actual estimation algorithm (default: 2)check_quantile
: check the quantile of the relative change of the parameters for convergence purposes (default: false)verb
: Verbose output (default: true)