% data moments
load usdata_47q1_17q4_unscaled.mat
data1 = [mean(dyobs(75:282)) mean(dcobs(75:282)) mean(dinvobs(75:282)) mean(dwobs(75:282)) mean(robs(75:282)) mean(pinfobs(75:282)) mean(labobs(75:282)) mean(spreadobs(75:282))];
data2 = [std(dyobs(75:282)) std(dcobs(75:282)) std(dinvobs(75:282)) std(dwobs(75:282)) std(robs(75:282)) std(pinfobs(75:282)) std(labobs(75:282)) std(spreadobs(75:282))];
data3 = corr([(dyobs(75:282)) (dcobs(75:282)) (dinvobs(75:282)) (dwobs(75:282)) (robs(75:282)) (pinfobs(75:282)) (labobs(75:282)) (spreadobs(75:282))]);

% model implied moments
model6 = oo_.posterior_variance([strmatch('dyobs',M_.endo_names,'exact') strmatch('dcobs',M_.endo_names,'exact') strmatch('dinvobs',M_.endo_names,'exact') strmatch('dwobs',M_.endo_names,'exact') strmatch('robs',M_.endo_names,'exact') strmatch('pinfobs',M_.endo_names,'exact') strmatch('labobs',M_.endo_names,'exact') strmatch('spreadobs',M_.endo_names,'exact')],[strmatch('dyobs',M_.endo_names,'exact') strmatch('dcobs',M_.endo_names,'exact') strmatch('dinvobs',M_.endo_names,'exact') strmatch('dwobs',M_.endo_names,'exact') strmatch('robs',M_.endo_names,'exact') strmatch('pinfobs',M_.endo_names,'exact') strmatch('labobs',M_.endo_names,'exact') strmatch('spreadobs',M_.endo_names,'exact')]);
100*data2
model5 = 100*sqrt(diag(model6))'
