Page 1 of 1

oo_.SmoothedVariables

PostPosted: Wed Apr 26, 2017 10:38 am
by Stefan_Boeters
In our estimations, the "oo_.SmoothedVariables" output does not behave as described in the manual.

The manual says about oo_.SmoothedVariables:
Variable set by the estimation command (if used with the smoother option), or by the calib_smoother command.
After an estimation without Metropolis, or if computed by calib_smoother, fields are of the form:
oo_.SmoothedVariables.VARIABLE_NAME
After an estimation with Metropolis, fields are of the form:
oo_.SmoothedVariables.MOMENT_NAME.VARIABLE_NAME

We run "estimation" without the "smoother" option (and with Metropolis draws). Still, our oo_ output contains both oo_.SmoothedVariables.VARIABLE_NAME and oo_.SmoothedVariables.MOMENT_NAME.VARIABLE_NAME fields. This deviates in two respects from the manual: (1) there is output even without the smoother option, (2) both types of output co-exists (whereas the manual suggests that they should be mutually exclusive).

Is this a bug or can this output be meaningfully used?

Re: oo_.SmoothedVariables

PostPosted: Wed Apr 26, 2017 12:04 pm
by Stefan_Boeters
Now my confusion is complete:

When I run the estimation with the smoother option, I still get both types of fields, but now the content of oo_.SmoothedVariables.MYVAR and oo_.SmoothedVariables.Mean.MYVAR is exchanged compared to the case without the smoother option.

Re: oo_.SmoothedVariables

PostPosted: Wed Apr 26, 2017 12:55 pm
by Stefan_Boeters
Further examination has revealed that the output reversion problem from post #2 appears only with one particular variable, which is the same variable that causes the problem in the thread viewtopic.php?f=1&t=19057. Therefore the problem is most probably specific for our model context and this particular variable. I'll sent up the model code.

Re: oo_.SmoothedVariables

PostPosted: Wed Apr 26, 2017 5:06 pm
by jpfeifer
Are you using the unstable version? And is your model maybe stochastically singular?

Re: oo_.SmoothedVariables

PostPosted: Thu Apr 27, 2017 8:54 am
by Stefan_Boeters
No, I'm using version 4.4.3 and I've not encountered singularity problems with my model.

When I prepared the code for sending it up and double-checked whether I was able to reproduce the results, I found that I was not. This gave me the clue to what had gone wrong. Apparently, I was partly looking at results of older estimation runs that were still included in the oo_ variable had not be overwritten or deleted.

And the reason for this, in turn, was that I was routinely using the "noclearall" option in invoking Dynare (following the suggestion in the thread viewtopic.php?f=1&t=7382 for avoiding spurious warnings). Apparently this caused old fields of the oo_ variable to remain.

Without the "noclearall" option, the oo_ content looks much more reasonable:

  • If I run "estimation" without the "smoother" option, I get oo_.SmoothedVariables.VARIABLE_NAME output, but no oo_.SmoothedVariables.MOMENT_NAME.VARIABLE_NAME output.
  • If I run "estimation" with the "smoother" option, I get oo_.SmoothedVariables.MOMENT_NAME.VARIABLE_NAME output, but no oo_.SmoothedVariables.VARIABLE_NAME output.
So the only question that remains is: What is the interpretation of the oo_.SmoothedVariables.VARIABLE_NAME output if I run "estimation" without the "smoother" option, but with Metropolis draws?

Re: oo_.SmoothedVariables

PostPosted: Thu Apr 27, 2017 8:58 am
by jpfeifer
1. Please upgrade to the unstable version due to the various bugfixes available (http://www.dynare.org/DynareWiki/KnownBugs). It will be released as Dynare 4.5 in the next month or so.
2. From the bug list
ESTIMATION: Results displayed after Bayesian estimation when not specifying the smoother-option are based on the parameters at the mode from mode-finding instead of the mean parameters from the posterior draws. This affects the smoother results displayed, but also calls to subsequent command relying on the parameters stored in M_.params like stoch_simul (a workaround can be found here)