# Some clarifications

**URL:** https://forum.dynare.org/t/some-clarifications/4064
**Category:** Dynare help (legacy posts)
**Created:** [29 July 2014 18:01 UTC](https://forum.dynare.org/t/some-clarifications/4064 "2014-07-29T18:01:35Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [29 July 2014 18:01 UTC](https://forum.dynare.org/t/some-clarifications/4064/1 "2014-07-29T18:01:35Z")

</div>

I had some clarifications regarding specifying some variables,  
1- Is it possible to specify a markov transition matrix for a variable ?  
2- Is it possible to have an exogenous variable normally distributed with mean different from 0, which is not shocked ?

---

<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: [5 August 2014 09:08 UTC](https://forum.dynare.org/t/some-clarifications/4064/2 "2014-08-05T09:08:03Z")

</div>

1. No. The shock processes in Dynare are continuous variables
2. This is equivalent to adding a constant to a mean 0 normally distributed variable. You can enter it this way.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [20 August 2014 05:51 UTC](https://forum.dynare.org/t/some-clarifications/4064/3 "2014-08-20T05:51:00Z")

</div>

Thanks a lot.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [20 August 2014 06:09 UTC](https://forum.dynare.org/t/some-clarifications/4064/4 "2014-08-20T06:09:20Z")

</div>

Thanks for you reply,  
I’m trying to replicate this paper ([nber.org/papers/w19208.pdf](http://www.nber.org/papers/w19208.pdf)) with some modifications. Their appendix has the dynare code.

I have coded my model and I get the required steady states for the log-linear model.  
I then convert the logged variables N, into its percentage level which is the rate of employment. I then subtract it from one to get the unemployment rates.

However, I am unable to estimate my parameters. I first got a remark that I should use the use\_calibration option with the estimated\_params\_init block. Once I did this the  
next error was that “Cannot use parameter values from calibration as they violate the prior bounds”. I have tried it with “s” which is the job separation rate and “bet” the discount factor.

Both give the same errors,  
I am wondering what the issue could be. My data file of unemployment rates has been attached too.

Regards,  
Thanks in advance.  
[shubh.mod](https://forum.dynare.org/uploads/default/original/2X/c/c2c45e46cfde591343f4df5ef7e84010bd400a4f.mod) (1.2 KB)

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [20 August 2014 06:16 UTC](https://forum.dynare.org/t/some-clarifications/4064/5 "2014-08-20T06:16:34Z")

</div>

I am unable upload my data file it seems, however the data is monthly unemployment rates from germany for the past 6 years.

---

<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: [20 August 2014 07:05 UTC](https://forum.dynare.org/t/some-clarifications/4064/6 "2014-08-20T07:05:25Z")

</div>

Please upload everything in one zip-file.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [20 August 2014 07:14 UTC](https://forum.dynare.org/t/some-clarifications/4064/7 "2014-08-20T07:14:25Z")

</div>

zip file  
[shubh.zip](https://forum.dynare.org/uploads/default/original/2X/f/fc192248c949e960fdc57608550743be08896cdf.zip) (7.42 KB)

---

<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: [20 August 2014 07:28 UTC](https://forum.dynare.org/t/some-clarifications/4064/8 "2014-08-20T07:28:40Z")

</div>

1. The shocks-block belongs before the estimation command, otherwise the variance will be set to 0 and use\_calibration will fail due to stochastic singularity of your calibration.

2. The data in the Excel file has no headers. I added them

3. You did not divide your unemployment rate in the data by 100 to make it equivalent to the variable in your model. I also did that.

A running version is attached.  
[shubh.zip](https://forum.dynare.org/uploads/default/original/2X/6/661dde2a968b91d889c8401111679fba16927e37.zip) (9.12 KB)

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [24 August 2014 18:22 UTC](https://forum.dynare.org/t/some-clarifications/4064/9 "2014-08-24T18:22:32Z")

</div>

Thanks a lot. Also when we have the log-linear model the impulse responses are in terms of the log deviations from steady state which can be interpreted as percentage deviations. However, I was wondering if we could get the impulse responses in level terms. The log-variables converted into level terms also have the irf with 0 steady state, i was wondering how we could get the irf’s for the level variables in terms of the levels itself.

Regards,

---

<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: [24 August 2014 19:16 UTC](https://forum.dynare.org/t/some-clarifications/4064/10 "2014-08-24T19:16:28Z")

</div>

Just add the steady state to them. You must do that manually. See the manual on where the steady states and the IRFs are stored.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [27 August 2014 13:03 UTC](https://forum.dynare.org/t/some-clarifications/4064/11 "2014-08-27T13:03:37Z")

</div>

Thanks a lot, another query that I had is,  
In my data if I have monthly data from 2007 on wards till 2014, then in my model if I shock my exogenous variable in the 12th period will it correspond to a shock in 2008 and be incorporated in the estimation process while using my data ?  
Kind regards,

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [27 August 2014 16:55 UTC](https://forum.dynare.org/t/some-clarifications/4064/12 "2014-08-27T16:55:40Z")

</div>

Also, When I have one stochastic shock process and one deterministic shock (say in period 12), Is the deterministic shock anticipated or unanticipated ?  
Is there any way to have an unanticipated shock in a later period such that agents dont respond to it during the first 11 periods ?

---

<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: [27 August 2014 20:55 UTC](https://forum.dynare.org/t/some-clarifications/4064/13 "2014-08-27T20:55:07Z")

</div>

Maybe I am misinterpreting what you are asking. Please try to explain what you are trying to model.

First post: No, the specified deterministic shocks using varexo\_det do not enter estimation at all. The only information used during estimation is the data and all shocks are inferred from the data.

Second post: From the manual entry for varexo\_det

[quote]It is possible to mix deterministic and stochastic shocks to build models where agents know  
from the start of the simulation about future exogenous changes.[/quote]

That means, there is perfect forsight here: the agents know at time 0 that there will be a one-time shock at time 12.

The “unanticipated shock in a later period such that agents dont respond to it during the first 11 periods” is just your standard stochastic shock.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [29 August 2014 07:01 UTC](https://forum.dynare.org/t/some-clarifications/4064/14 "2014-08-29T07:01:40Z")

</div>

Thanks a lot Sir,  
I mostly had doubts regarding what you explained and things are much clearer to me now, so thanks a lot.

Just to clarify  
1 - What did you exactly mean by that all shocks are inferred from the data ? To what extent does the specification of the stochastic shocks matter as in its AR process and standard deviation in estimation.

2 - There is no way to have a surprise deterministic shock, because a fall in the deterministic shocks value in some period after the economy begins will always be taken into account in previous periods because of prefect foresight.

Regards,

---

<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: [29 August 2014 08:47 UTC](https://forum.dynare.org/t/some-clarifications/4064/15 "2014-08-29T08:47:40Z")

</div>

1. With the shocks-block you specify the stochastic processes of the state-space system. The autocorrelation and variance of the processes is either fixed or estimated. But the actual shock realizations are estimated as the residuals from the state-space system.

2. Sorry, but I do not know that a “surprise determinstic shock” is. This is an oxymoron.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [29 August 2014 19:54 UTC](https://forum.dynare.org/t/some-clarifications/4064/16 "2014-08-29T19:54:40Z")

</div>

Thank you, For the second point I meant If it was possible to have an unanticipated shock in the future ?

---

<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: [29 August 2014 21:36 UTC](https://forum.dynare.org/t/some-clarifications/4064/17 "2014-08-29T21:36:46Z")

</div>

Estimation allows unanticpated shocks at any point in time in the future. If you are asking whether you can pre-specify the value of an unanticipated shock happening at a future point in time that is taken as given in estimation, the answer is no.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [29 August 2014 22:08 UTC](https://forum.dynare.org/t/some-clarifications/4064/18 "2014-08-29T22:08:20Z")

</div>

What about the scope of pre-specified values of unanticipated shocks in the deterministic and stochastic models and just analyzing their transition to a new steady state ?  
before any estimation takes place.

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [30 August 2014 03:57 UTC](https://forum.dynare.org/t/some-clarifications/4064/19 "2014-08-30T03:57:18Z")

</div>

Also regarding your paper -  
[sites.google.com/site/pfeiferec … edirects=1](https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf?attredirects=1)

My model is calibrated with weekly estimates of parameters and the steady states correspond to the weekly real world values of endogenous variables.  
However, my data is the monthly unemployment rate.  
I was wondering if this would lead to spurious estimation results. But your paper mentions that for a stock variable the length of the model period or frequency does not matter. And since unemployment rate is an average or stock variable this should not affect the estimation. Am i correct ?

---

<div class="post-metadata">

### Author: ![shubh](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@shubh](https://forum.dynare.org/u/shubh)
#### Post date: [30 August 2014 21:31 UTC](https://forum.dynare.org/t/some-clarifications/4064/20 "2014-08-30T21:31:02Z")

</div>

Or should I use the kalman filter with missing data for some weeks as mentioned in your paper ?  
My observations are monthly unemployment rates.

[Next page](https://forum.dynare.org/t/some-clarifications/4064.md?page=2)
