Estimation over sub-samples, structural change

Computing log-posterior over sub-samples

Using information provided by estimation_info_

New dsge_likelihood.m function:

  1. Initialize kalman_algo
  2. Check boundaries for all estimated parameters
  3. Initialize M_.Sigma_e, M_.H and M_.params for 1st sub-sample (new separate function)
  4. call dsge_likelihood_sub()
  5. For each sub-sample
    1. Update M_.Sigma_e, M_.H and M_.params
    2. call dsge_likelihood_sub()

New dsge_likelihood_sub.m

  1. Compute T, R and steady_state (using dynare_resolve())
  2. Demean/detrend observations (new separate function)
  3. Initialize Kalman filter (Pstar, Pinf) (new separate function) [first subsample only]

  4. Run diffuse filter if necessary. [first subsample only]

  5. Run Kalman filter

New dsge_log_posterior function:

  1. call (new) dsge_likelihood.m
  2. add log-prior density

New dsge_smoother.m function:

  1. Initialize kalman_algo
  2. Check boundaries for all estimated parameters
  3. Initialize M_.Sigma_e, M_.H and M_.params for 1st sub-sample (new separate function)
  4. Compute T, R and steady_state (using dynare_resolve())
  5. Demean/detrend observations (new separate function)
  6. Initialize Kalman filter (Pstar, Pinf) (new separate function)
  7. Run diffuse filter if necessary. Report error if doesn't converge in first sub-sample.
  8. Run Kalman filter (make separate function) on 1st sub-sample
  9. For each sub-sample
    1. Update M_.Sigma_e, M_.H and M_.params
    2. Compute T, R and steady_state
    3. Demean/detrend observations
    4. Run Kalman filter
  10. For each sub-sample backwards:
    1. Update M_.Sigma_e, M_.H and M_.params
    2. Compute T, R and steady_state
    3. Demean/detrend observations
    4. Run Kalman smoother (make separate function)
  11. If necessary call diffuse smoother