Posterior predictive moments

Thanks a lot. For 2, I do not get the “oo_.gamma_y” variable at the end of the estimation routine as it stands. Should I run a stochastic simulation after the estimation command, something like


estimation (…)
posterior_function(function=‘posterior_function_demo1’, sampling_draws=500);

% read out the contents of the cell and put them into ndraws by ncolumns
posterior_params=cell2mat(oo_.posterior_function_results(:,1));
posterior_steady_states=cell2mat(oo_.posterior_function_results(:,2));

prior_function(function=‘posterior_function_demo1’);

% read out the contents of the cell and put them into ndraws by ncolumns
prior_params=cell2mat(oo_.prior_function_results(:,1));
prior_steady_states=cell2mat(oo_.prior_function_results(:,2));

stoch_simul(irf=60) PI PI_star;

Alternatively, can I use the {oo_.posterior_function_results{x,2}) dimension, which you clarified is the simulation output, to compute the autocovariances myself “by hand”?