Saved posterior theoretical moments

Dear all,

Where are the posterior theoretical moments (mean, std) saved (apart from the log file)? I conjecture that the mean should be taken from the oo_.steady_state, although it would be nice to see it in the oo_.PosteriorTheoreticalMoments as well. But I cannot find the std: I presume it should be in the oo_.PosteriorTheoreticalMoments.dsge.covariance mean' orvariance’ structure but both deliver NaNs for all variables although the log file gives reasonable numerical values.


Please provide the mod-file.

Both the mod and the log files attached.

Additionally, (the same mod-file but should be under a different subject) I’m asking the estimation command for the k-step ahead forecasts but no output is provided in the oo_ structure:

estimation(order=1,datafile=ctwBaselineData, mh_replic=300000, mh_nblocks=1, mh_drop=.3, mh_jscale=0.2, mode_compute=6, filter_step_ahead = [1 4 8 12], forecast=20,smoother, filtered_vars, diffuse_filter, nodisplay, % do this only for the final model b/c takes a lot of time moments_varendo, conditional_variance_decomposition=[1 4 8 20], % graph_format=(eps,pdf))
baseline70log.txt (432 KB)
baseline70.mod (57.7 KB)

I cannot run the mod-file. What else does one need? A steady state file? Data file?

All the required files are attached. Please, change the .txt extension to .mat extension.
baseline_steadystate_find_AL_delta_varphi.m (3.29 KB)
myOriginalData.txt (11.8 KB)
baseline70_steadystate.m (34.1 KB)
baseline70.mod (57.7 KB)

Try the most recent snapshot. Moreover, some of the moments are saved in fields like oo_.posterior_mean

Still with ver.4.3.3.:
As far as I understood, this happens when some of the variables are nonstationary, i.e., would result in the `NaN’ value. Then, the log-file reports NaN values only for the nonstationary variables but the oo_ structure yields all NaNs regardless of stationarity.

Repeating the exercise without the nonstationary variables, the oo_ structure gives numerical values. However, the values in the oo_.PosteriorTheoreticalMoments.dsge.covariance.mean' structure slightly differ from the ones reported in the log-file under the titleTheoretical moments’.

I am not sure I am following here.

Theoretical moments are displayed only in the log file for stoch_simul. Those moments are based on the posterior mean of the parameters when called after estimation.

But the posterior moments stored in oo_ are the mean of the posterior moments (given parameter draws from the posterior distribution). This is different than the moments at the mean of the parameters.

Got it.
And the stoch_simul moments are in oo_.mean and oo_.var.