# Parameter dependence and # operator

**URL:** <https://forum.dynare.org/t/parameter-dependence-and-operator/4936>\
**Category:** ML/Bayesian estimation\
**Created:** [21 August 2015 16:51 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936 "2015-08-21T16:51:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![econ86](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/d9b06d/32.png) [@econ86](https://forum.dynare.org/u/econ86)\
**Post date:** [21 August 2015 16:51 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/1 "2015-08-21T16:51:11Z")

</div>

Dear all,

When estimating DSGE model, I’m taking into account parameter dependence. My question is: where are the calculated SS relations that make use of # operator stored after the estimation?

Best,

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [21 August 2015 18:17 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/2 "2015-08-21T18:17:00Z")

</div>

They are not stored at all. If you want them to be stored, you need to define them as parameters and use a steady\_state\_model block to make sure they are correctly updated in every draw.

---

<div class="post-metadata">

**Author:** ![econ86](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/d9b06d/32.png) [@econ86](https://forum.dynare.org/u/econ86)\
**Post date:** [22 August 2015 06:41 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/3 "2015-08-22T06:41:49Z")

</div>

Dear J. Pfeifer,

If I understand you correctly, this is the same as using # operator with the only difference being that in this case the calculated SS relations are stored. Am I right?

Best.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [22 August 2015 09:08 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/4 "2015-08-22T09:08:15Z")

</div>

Yes. The #operator is basically a placeholder where the preprocessor, whenever such an expression is encoutered, is replaced by the right-hand side of the definition. Thus, the model-local do not exist anymore when the model is run as they are simply replaced by the expression involving the original parameters.

In contrast, the steady\_state\_model block allows storing such expressions. The reason is that you are defining a separate parameter that is stored, but because the steady state file is executed every time the model is solved the parameters are correctly updated when you specify the dependencies correctly.

---

<div class="post-metadata">

**Author:** ![econ86](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/d9b06d/32.png) [@econ86](https://forum.dynare.org/u/econ86)\
**Post date:** [22 August 2015 12:00 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/5 "2015-08-22T12:00:49Z")

</div>

Ok, but I still have a problem. Now I have the following:

**var** mu\_zhat epsilon Upsilon z\_tildestar zeta\_c …

**varexo** epsilon\_muz epsilon\_epsilon epsilon\_Upsilon …

**parameters** beta alpha eta\_c sigma\_a sigma\_L … (b\_w and y\_bar are not declared here)  
beta=0.995;  
//b\_w = (lambda\_w_sigma\_L-(1-lambda\_w))/((1-beta_xi\_w)_(1-xi\_w)); // Wage equation parameter  
//y\_bar =(1/lambda\_d)_((mu\_z)^(-alpha))\*((k\_H)^(alpha))\*H; // SS output  
etc.

**model(linear);**  
…  
#b\_w = (lambda\_w_sigma\_L-(1-lambda\_w))/((1-beta_xi\_w)_(1-xi\_w)); // Wage equation parameter  
 #y\_bar =(1/lambda\_d)_((mu\_z)^(-alpha))\*((k\_H)^(alpha))\*H; // SS output

etc.

When using the steady\_state\_model I would have:

**var** mu\_zhat epsilon Upsilon z\_tildestar zeta\_c …

**varexo** epsilon\_muz epsilon\_epsilon epsilon\_Upsilon …

**parameters** beta alpha eta\_c sigma\_a sigma\_L … b\_w and y\_bar  
beta=0.995;  
//b\_w = (lambda\_w_sigma\_L-(1-lambda\_w))/((1-beta_xi\_w)_(1-xi\_w)); // Wage equation parameter  
//y\_bar =(1/lambda\_d)_((mu\_z)^(-alpha))\*((k\_H)^(alpha))\*H; // SS output  
etc.

\*\*model(linear);  
\*\*…

end;

\*\*steady\_state\_model;  
\*\*b\_w = (lambda\_w_sigma\_L-(1-lambda\_w))/((1-beta_xi\_w)_(1-xi\_w)); // Wage equation parameter  
y\_bar =(1/lambda\_d)_((mu\_z)^(-alpha))\*((k\_H)^(alpha))\*H; // SS output

end;  
etc.

I’m not sure whether this is correct.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [22 August 2015 13:04 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/6 "2015-08-22T13:04:05Z")

</div>

Looks good to me.

---

<div class="post-metadata">

**Author:** ![econ86](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/d9b06d/32.png) [@econ86](https://forum.dynare.org/u/econ86)\
**Post date:** [23 August 2015 10:12 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/7 "2015-08-23T10:12:55Z")

</div>

I placed all the parameters and SS relations that are dependent on the estimated parameters under the steady\_state\_model block as described in my previous post, but when running the estimation, I encounter the following problem:

Error using print\_info (line 72)  
The steadystate file did not compute the steady state

Error in print\_info (line 72)  
error(‘The steadystate file did not compute the steady  
state’)

Error in initial\_estimation\_checks (line 69)  
print\_info(info, DynareOptions.noprint, DynareOptions)

Error in dynare\_estimation\_1 (line 179)  
oo\_ =  
initial\_estimation\_checks(objective\_function,xparam1,dataset\_,M\_,estim\_params\_,options\_,bayestopt\_,oo\_);

Error in dynare\_estimation (line 89)  
dynare\_estimation\_1(var\_list,dname);

Error in model1 (line 1058)  
dynare\_estimation(var\_list\_);

Error in dynare (line 180)  
evalin(‘base’,fname) ;

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [23 August 2015 16:06 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/8 "2015-08-23T16:06:42Z")

</div>

When your model is linear, this is impossible. Please provide the files.

---

<div class="post-metadata">

**Author:** ![econ86](https://forum.dynare.org/letter_avatar_proxy/v4/letter/e/d9b06d/32.png) [@econ86](https://forum.dynare.org/u/econ86)\
**Post date:** [23 August 2015 17:35 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/9 "2015-08-23T17:35:20Z")

</div>

Yes, I use the well-known model of Adolfson et al. which is also included in the Macroeconomic Model Data Base (name EA\_SR07). It is log-linearized, variables are expressed as percentage deviations from SS (hat variables).

So, with that model the best way is to use the pound operator # in front of the parameters and SS relations that are dependent on the estimated parameters?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [23 August 2015 17:47 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/10 "2015-08-23T17:47:21Z")

</div>

I need the files to replicate the issue.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [30 August 2015 15:21 UTC](https://forum.dynare.org/t/parameter-dependence-and-operator/4936/11 "2015-08-30T15:21:08Z")

</div>

This has to do with the fact that you have a linear model with variables that contain constant terms. You need to provide analytical solutions for these variables when you use a steady\_state\_model block. You could use the initval-block values from my other response to your model: [[Steady state values in log-linearized model: Problem](https://forum.dynare.org/t/steady-state-values-in-log-linearized-model-problem/4947/3))
