= 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 1. Check boundaries for all estimated parameters 1. Initialize M_.Sigma_e, M_.H and M_.params for 1st sub-sample (new separate function) 1. call dsge_likelihood_sub() 1. For each sub-sample i. Update M_.Sigma_e, M_.H and M_.params i. call dsge_likelihood_sub() New dsge_likelihood_sub.m 1. Compute T, R and steady_state (using dynare_resolve()) 1. Demean/detrend observations (new separate function) 1. Initialize Kalman filter (Pstar, Pinf) (new separate function) '''[first subsample only]''' 1. Run diffuse filter if necessary. '''[first subsample only]''' 1. Run Kalman filter New dsge_log_posterior function: 1. call (new) dsge_likelihood.m 1. add log-prior density New dsge_smoother.m function: 1. Initialize kalman_algo 1. Check boundaries for all estimated parameters 1. Initialize M_.Sigma_e, M_.H and M_.params for 1st sub-sample (new separate function) 1. Compute T, R and steady_state (using dynare_resolve()) 1. Demean/detrend observations (new separate function) 1. Initialize Kalman filter (Pstar, Pinf) (new separate function) 1. Run diffuse filter if necessary. Report error if doesn't converge in first sub-sample. 1. Run Kalman filter (make separate function) on 1st sub-sample 1. For each sub-sample i. Update M_.Sigma_e, M_.H and M_.params i. Compute T, R and steady_state i. Demean/detrend observations i. Run Kalman filter 1. For each sub-sample backwards: i. Update M_.Sigma_e, M_.H and M_.params i. Compute T, R and steady_state i. Demean/detrend observations i. Run Kalman smoother (make separate function) 1. If necessary call diffuse smoother