Computation of Composite Parameters

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.

Computation of Composite Parameters

Postby Rasa » Tue May 31, 2011 7:18 am

Hello,

What is the difference between using the two options for computing a composite parameter betaP:

1. in *.mod file
Code: Select all
# betaP = 1/(1+betta_rateP/100);

2. in *_steadystate.m file
Code: Select all
betaP = 1/(1+betta_rateP/100);
idx_betaP= strmatch(betaP',M_.param_names,'exact');
M_.params(idx_betaP) = betaP;


I think the two options are quivalent. Here, I on purpose made a simple example. But one could have a more complicated composite parameter expressed in terms of some steady state ratios targeted in calibration, or in terms of some other parameters that could be estimated by Bayesian estimation.

Thank you!
Rasa
Rasa
 
Posts: 3
Joined: Fri Jan 28, 2011 2:06 pm

Re: Computation of Composite Parameters

Postby jpfeifer » Wed Jun 01, 2011 7:12 am

For practical purposes, it is mainly a matter of convenience. In both cases, you end up with a parameter computed as a composite of other parameters. However, there are slight differences. If you define an expression with # betaP, Dynare treats this as a local variable, but does not create a parameter betaP that would be stored in M_.params (you don't define betaP in the params-block). The Dynare preprocessor upon running the model-file effectively substitutes the righthand side of this expression for every occurence of the lefthand side, thereby eliminating it altogether. Hence, this local variable is not available outside the model-block.

In contrast, if defined in the steady state file, betaP is treated as a regular parameter (which you thus have to declare in the params-block). Sometimes it is convenient to be able to directly assess the resulting parameter after Dynare has run. In this case, using the second version may be better.

Moreover, computing such a parameter in the steady state file is convenient, if you have to compute it in any case just to compute your steady state. This is because the local variable betaP created with # betaP cannot be accessed in the steady state file. You would have to compute it again if you want to use it in the 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


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests