Saved posterior theoretical moments

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Saved posterior theoretical moments

Postby gin » Wed Sep 18, 2013 8:35 am

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' or `variance' structure but both deliver NaNs for all variables although the log file gives reasonable numerical values.

Version:4.3.3.
gin
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: Saved posterior theoretical moments

Postby jpfeifer » Wed Sep 18, 2013 8:38 am

Please provide the mod-file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Saved posterior theoretical moments

Postby gin » Wed Sep 18, 2013 9:11 am

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:

Code: Select all
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))
Attachments
baseline70log.txt
(431.62 KiB) Downloaded 66 times
baseline70.mod
(57.71 KiB) Downloaded 67 times
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: Saved posterior theoretical moments

Postby jpfeifer » Wed Sep 18, 2013 11:37 am

I cannot run the mod-file. What else does one need? A steady state file? Data file?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Saved posterior theoretical moments

Postby gin » Wed Sep 18, 2013 12:10 pm

All the required files are attached. Please, change the .txt extension to .mat extension.
Attachments
baseline_steadystate_find_AL_delta_varphi.m
called by _steadystate.m
(3.29 KiB) Downloaded 68 times
myOriginalData.txt
data mat-file: change .txt to .mat
(11.77 KiB) Downloaded 64 times
baseline70_steadystate.m
(34.06 KiB) Downloaded 71 times
baseline70.mod
(57.71 KiB) Downloaded 74 times
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: Saved posterior theoretical moments

Postby jpfeifer » Thu Sep 19, 2013 1:12 pm

Try the most recent snapshot. Moreover, some of the moments are saved in fields like oo_.posterior_mean
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Saved posterior theoretical moments

Postby gin » Fri Sep 20, 2013 8:35 am

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 title `Theoretical moments'.
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: Saved posterior theoretical moments

Postby jpfeifer » Fri Sep 20, 2013 11:46 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Saved posterior theoretical moments

Postby gin » Mon Sep 23, 2013 8:06 am

Got it.
And the stoch_simul moments are in oo_.mean and oo_.var.
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests