Using deep parameters in steady_state_model; section

Hi all!

I’m rather new to Dynare and have a tricky problem which hopefully has an easy solution. I tried searching, but using # in searches is kind of awkward and couldn’t find a good answer.

Sorry, but this is going to be confusing. Please bear with me and ask questions about where you’re confused. I know I’m not going to be able to explain everything in one go, but I’ll try.

Key information:
[ul]]My model is expressed in terms of log-linearized variables. In other words, all of my variables are expressed using the xSSexp(x) convention meaning that while I’m calling xSS the “steady state” value of x, in the steady_state_model; section I have x=0 because the log deviation from steady state (xSS) is zero in the long run. This works because I’m using a first order approximation of my model./*]
]The model I’m working with has a full analytic solution for the steady state (already determined)/]
]The values of many “steady states” depend on estimated parameters/]
]I have a few observed variables with raw data which relate to variables in the equation with measurement noise/]
[list]For example: DIFFREALGDP_observed = DIFFREALGDP + eDIFFREALDGP + DIFFREALGDPSS where eDIFFREALGDP is a shock with a calibrated variance (the measurement error) and DIFFREALGDPSS is the “steady state” value of DIFFREALGDP[/ul]
]The “steady states” are defined in the model block using # - (for example #RSS = INFCSS/beta;). I’ve been convinced that this is a good idea because some steady state values depend on estimated parameters./]
[/list:u]

The question:
I need the steady state value (in the actual steady_state_model; section) of DIFFREALGDP_observed (and the other observed variables) to be DIFFREALGDPSS (or the equivalent for the others). Since DIFFREALGDPSS is defined with a # in the model block, I can’t just set DIFFREALGDP_observed = DIFFREALGDPSS because DIFFREALGDPSS only has scope within the model block. I could detrend the data so that its zero-mean, but that didn’t seem like a good idea to my coworkers. Could I use a steady state file to get around this problem, and how would that work? Any other ideas? Let me know if I wasn’t clear about something.

Thanks in advance,
-Eric

Sorry, but I don’t get the problem. The only reason to define DIFFREALGDPSS using the pound operator # is if it is a function of deep parameters. But then you can use the RHS of the expression in the steady_state-section.

An alternative is to move everything to a steady state file. Define the expressions are parameters and just update them in the steady state file. See [Why is _steadystate.m important when estimating a model) for a starting point.

Thanks for your timely response!

Let me try to explain…

DIFFREALGDPSS is a function of other steady states, calibrated parameters and estimated parameters. The same is true for most of the other steady states. The reason I’m using a # and defining it in the model is because, as I understand it now (and I could be wrong), if I defined DIFFREALGDPSS as a parameter it wouldn’t be updated due to changing values of estimated parameters after subsequent MCMC draws. In other words, it would use initial estimates or prior modes for the value of estimated parameters when it computes DIFFREALGDPSS before anything else happens and that value would never be updated. Is that true? I could avoid this whole problem by defining it as a parameter without # and outside of the model block if it gets estimated using the final values of estimated parameters, but it’s tricky if it won’t be reevaluated to match changing views on the value of estimated parameters.

Sorry if I’m not making any sense. If I’m not, I would really appreciate your patience in helping me figure this out.

-Eric

Your diagnosis is correct. My point is, imagine you have something like

model; #DIFFREALGDPSS =(alpha+beta)*gamma; ... end;

Then, if you need to use DIFFREALGDPSS in the steady state values, just use the RHS of the definition.

initval; DIFFREALGDP_observed = =(alpha+beta)*gamma; end;
If this is not easily done, use a steady state file.

Thanks for your help! I’ll look into using a steady state file. The other forum posts are beginning to make much more sense to me now.

Do you think an option to interpret the model as log-linearized would ever be possible? I know it’s an open source project, and we’re thinking about making some changes to the code to get that working (although that could end up being difficult for a lot of different reasons). What do you think about that option? Are you too busy with other features, don’t think it’s important, think it’s a bad idea or something else? I’d be interested to hear what you think.

-Eric

Dear Eric,

in terms of computing moments, we have the loglinear option of stoch_simul at order 1 to produce results as if loglinearized.

To compute a true loglinearization including the IRFs, you have to perform a variable substitution. Just put all variables you want to have log-linearized in exp(). It would be an idea to implement a command like the predetermined_variables command to specify the variables that should be put in exp().

Just generally performing the variable substitution is usually not a good idea, because you always have variables that are already in logs or have a negative steady state.

Best,

Johannes