Using deep parameters in steady_state_model; section

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Using deep parameters in steady_state_model; section

Postby eric_till » Wed Mar 27, 2013 3:05 pm

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:
  • My model is expressed in terms of log-linearized variables. In other words, all of my variables are expressed using the xSS*exp(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
    • 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
  • 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.


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
eric_till
 
Posts: 5
Joined: Wed Mar 27, 2013 2:26 pm

Re: Using deep parameters in steady_state; section

Postby jpfeifer » Wed Mar 27, 2013 3:36 pm

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 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4506 for a starting point.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Using deep parameters in steady_state_model; section

Postby eric_till » Wed Mar 27, 2013 7:27 pm

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
eric_till
 
Posts: 5
Joined: Wed Mar 27, 2013 2:26 pm

Re: Using deep parameters in steady_state_model; section

Postby jpfeifer » Wed Mar 27, 2013 9:25 pm

Your diagnosis is correct. My point is, imagine you have something like
Code: Select all
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.

Code: Select all
initval;
DIFFREALGDP_observed =  =(alpha+beta)*gamma;
end;

If this is not easily done, use a steady state file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Using deep parameters in steady_state_model; section

Postby eric_till » Thu Mar 28, 2013 1:44 pm

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
eric_till
 
Posts: 5
Joined: Wed Mar 27, 2013 2:26 pm

Re: Using deep parameters in steady_state_model; section

Postby jpfeifer » Thu Mar 28, 2013 3:07 pm

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
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests