You can use the option "smoother" with estimation. If you don't have provided a list of variables after the estimation command, Dynare asks you:
"Choose one of the following options: [1] Consider all the endogenous variables. [2] Consider all the observed endogenous variables. [3] Stop Dynare and change the mod file."
and waits for an answer. This is unhandy for batch processing. Is there a way to tell Dynare right away which option to select? (I tried "smoother = 1", but this doesn't work.)