after the estimation of a DSGE model researchers usually compare unconditional second moments in the estimated DSGE model with those based on the actual data. Here is an example how unconditional second moments can be computed for the estimated DSGE model (this example is based on ALLV paper: Bayesian Estimation of an Open Economy DSGE Model with Incomplete Pass-Through):

For the model, we report the median from the simulated distribution of moments, computed from the 12,204
samples of length 92 periods each, which were generated by simulating the DSGE model using parameters bootstrapped
off the posterior distribution.

thank you for your answer. Is there any other (simplest) way to do this exercise in Dynare - to compare moments of data generated by the estimated DSGE model with those based on the actual data? What do you suggest?

Maybe the use of get_simul_replications.m (from your personal web page) together with the command stoch_simul after the estimation of a DSGE model?

If you are a bit more flexible, you can immediately compare the theoretical moments of the model with the ones of the data. An example is the GarciaCiccoetal2010.mod on my homepage. But this implies that you use first differences as the filter.

thank you very much for your help. As you suggested I additionally included the command moments_varendo in the estimation command. But in this case the estimation does not finish. It ends up with Bayesian irf-s, but Dynare does not execute, for example, smoother, filtered_vars, shock_decomposition (graphs for these things are missing). In the end there is also no estimation time displayed.

I use the following:
estimation(datafile=MyData, presample = 0, prefilter = 0, mh_replic = 200000, mode_compute=6,
mh_nblocks = 2, mh_jscale = 0.25, filtered_vars, smoother, moments_varendo, bayesian_irf, graph_format = (fig,pdf));

Results are stored in oo_.PosteriorTheoreticalMoments which is of the following structure:
-covariance
-correlation
-VarianceDecomposition
*Mean
*Median
*Variance
*HPDinf
*HPDsup
*deciles
*density
-ConditionalVarianceDecomposition
*Steps
*Mean
*Median
*Variance
*HPDinf
*HPDsup
*deciles
*density

My question is: where exactly are the unconditional second moments of endogenous variables stored?