%% Esitmate structural parameters using simulated data.
% Model A = 4 structural shocks and 4 variabs (y,c,i,w)  (best 1)
% Model B = 4 structural shocks and 4 variabs (y,c,i,h)  (best 2)
% Model Z = 4 structural shocks and 4 variabs (c,i,pi,r) (worst)
% Model C = 4 structural shocks + 3 measurement and 7 variables
% Model D = 7 structural shocks and 7 variables


load database
KK = 150;
y      = y(end-KK:end) ;
c      = c(end-KK:end) ;
inve   = inve(end-KK:end) ;
w      = w(end-KK:end)  ;
pinf   = pinf(end-KK:end) ;
r      = r(end-KK:end) ;
lab      = lab(end-KK:end) ;
 
save data_A     y c inve w;             % good comb
save data_B     y c inve lab;           % good comb
save data_Z     c inve pinf r;          % bad comb

% all variables and three measurement shocks
y_o      = y ;
c_o      = c ;
i_o      = inve ;
w_o      = w  ;
pi_o     = pinf ;
r_o      = r ;
h_o      = lab ;
save data_C     y_o c_o i_o w_o h_o r_o pi_o ;

% all variables and 7 structural shocks
save data_D  y c inve w lab r pinf ;

dynare sw_A; clear all; close all; clc; pause(2);    
dynare sw_B; clear all; close all; clc; pause(2);    
dynare sw_Z; clear all; close all; clc; pause(2);    
dynare sw_C; clear all; close all; clc; pause(2);
dynare sw_D; clear all; close all; clc; pause(2);
