Proposed specification for estimation functions
This includes factorization of common code and extensions for (unexpected) structural change
Estimated parameters description
xparam1 becomes a structure with the following fields
- value
- type (1,2,3,4,5)
- ID1
- ID2 (for correlations)
- Period1 (beginning of sub-period)
- Period2 (end of sub-period)
Functions
- Likelihood/posterior evaluation (separate two functions ?)
- - INPUTS: xparam1, data, prior_specifications, ys, coeff_trends, M_.params, M_.Sigma_e, M_.H, list_of_observed_variables - OUTPUTS: likelihood/posterior value, info
- parameter updates (for period 1):
- - INPUTS: xparam1, ys, coeff_trends,M_.params, M_.Sigma_e, M_.H - OUTUTS: coeff_trends, params, Sigma_e, H
- reduced form (for period 1):
- - INPUTS: params - OUTPUTS: T R ys - computes steady state - computes linear solution for state variables + observed variables
- data_filtering (for period 1):
- - INPUTS: data, ys, coeff_trends, Period1, Period2 - OUTPUTS: centered_data for subperiod
- Kalman filter initialization
- - INPUTS: Sigma_e T R list_of_observed_variables - OUTPUTS: a0 P0 Z - Remark: Z is computed only for nonstationary models. mfs is computed once before these functions
- Diffuse Kalman filter recursions takes place here ?
- Kalman filter - INPUTS: a0 Po Z T R centered_data Sigma_e H - OUTPUTS: log-likelihood, a(t|t-1), P(t|t-1)
if period < NP:
- parameter updates
- reduced form
- data_filtering
- - INPUTS: Sigma_e T R list_of_observed_variables - OUTPUTS: a0 P0 Z - Remark: Z is computed only for nonstationary models. mfs is computed once before these functions
- priors evaluation