Latent variables with data

We are currently experimenting with different sets of observables for a DSGE model in order to find the set with which the model performs best. In this process, the endogenous variables of the model fall into three distinct classes:

(1) latent variables, for which there are no empirical time series,
(2) observables, which are declared in the “varobs” statement and for which we have empirical data,
(3) “potential observables”, which are not included in the “varobs” statement, but for which we have data (which is assigned to the variables in the data reading routine).

How does Dynare treat these “potential observables”? Our assumption was that they would be treated the same as the latent variables, i.e. that it should not matter at all if some empirical values are assigned to these variables in the data reading routine.

However, it does seem to matter after all. Results of the estimation diverge dependent on whether or not we assign empirical values to these potential observables. In certain cases it looks like if Dynare fits the shocks to match these potential observables even though they are not in the “varobs” list.

Can anyone make sense of this? Are you only allowed to assign empirical values to the observables that are in the “varobs” list? Shouldn’t Dynare then give a warning whenever this is not the case?

Can you please provide me with codes to replicate the issue? You can e.g. send them per email.

As so often, my focus on the problem shifted when I was busy preparing a condensed and cleaned version of the model to submit. There is a related problem with the field “SmoothedVariables” of oo_, which I’ll post in a separate thread shortly.

Most probably, this problem boils down to a problem with the robustness of the oo_.SmoothedVariables output reported in this thread: oo_.SmoothedVariables. Until now, we were able to identify the problem only with one particular endogenous variable (which, apart from this, seems to behave fine). So, indeed, I need to send up the code to clarify the issue.

Actually, the two points were closely related. As explained in the thread oo_.SmoothedVariables, I was looking at output from old estimation runs that had not been deleted from the oo_ output, and I was confused about the co-existence of oo_.SmoothedVariables.VARIABLE_NAME and oo_.SmoothedVariables.MOMENT_NAME.VARIABLE_NAME.

Thanks, Johannes, for the offer to send up the code. As so often, the urge to produce a cleaned set of files with reproducible results was enough to give the decisive clue to the cause of the problem.