Agent learing through Kalman Filter


I am curious if anybody can implement in dynare a model in which the agents learns the parameter of a hidden state-variable through Kalman fitler, like in … 8914000177

A Dynare example would be highly appreciated!

Basically, what I am thinking needs to be done in dynare is that agent will have an exogenous parameter (hidden-state-variable), that is updated period by period through some external loop. I have no idea if it is possible to pass through this parameter into dynare period-by-period, nor do I have any idea how Dynare can calcualte moments in such a setup.

If a learning example is not available, any kind of example, in which a parameter loop is passed into dynare , is appreciated.

Patrick Hürtgen actually used Dynare for this paper. Unfortunately, I haven’t yet found the time to prepare his codes for dissemination and posting them online.

Quick question, is there a way to declare the shock variables as observables in the estimation()
procedure? Since in the learning model, the agent only knows innovation but doesn’t know what are the true shocks.

You probably know what I’m thinking, I want to feed in innovations from empirical data into this learning model, with hard coded Kalman learning in the mod file, and estimate other parameters [steady state Kalman gain and so forth, and other utility parameters].
I understand the answer is very likely to be no.

I don’t know whether this is feasible, but you can try. You cannot define exogenous variables as observed. But you can define auxiliary endogenous variables that are identical to the shocks, e.g.

var a_aux...; varexo a ... ; model; a_aux=a; end; varobs a_aux ...;