Changing parameters in transition experiments

In ‘Practicing Dynare’ chapter 4 ‘Fiscal policies in the growth model’, there are some transition experiments with permanent change of certain parameters at some period, say ‘g’, government spending rate as in the first example. Here ‘g’ is fixed and only changes once and for all to another fixed value.

Would it be possible that we can have time varying value of ‘g’ over its whole path, with ‘g(t)’ instead of ‘g’? And how can we realize this in Dynare?

I found this kind of experiment in Andrea Ferrero’s working paper ’ Demographics and Real Interest Rates - Inspecting the Mechanism’, where they use time varying birth rate and mortality rate. The only thing they mention is the usual shooting algorithm in Dynare is used. As shooting algorithm is just a routine procedure for transition experiment with constant parameter and only one time change, it is puzzling for me to think through.

The g is defined as varexo. That means its evolution over time is perfectly known, but it can change at any point in time. Have a look at the manual on the shocks -block on how to specify a path for exogenous variables

Dear Prof. Pfeifer:

It seems like the only command for this purpose to specify a path for exogenous variables in ‘‘Dynare Manual’’ is ‘’ initval_file ‘’. So I tried this command to replicate the Figure 11.3.1 in chapter 11 of Ljungqvist and Sargent (2004) ( and section 4.3.1 in Practicing Dynare (2007)), the situation of a permanent increase of 0.2 in g. The figure generated is in the following:

https://dl.dropboxusercontent.com/u/4041338/Fig1131_initval_file.jpg

The graphs of the first 50 periods are exactly the same as Figure 11.3.1 in chapter 11 of Ljungqvist and Sargent (2004), but the later periods have some funny shape.

If I change the discontinuously sudden increase of g to a smooth changing path: g = 0.2*exp(.99639478.^(n-1)-.95.^(n-1)) where n is from 1 to 100, we still have g(1)=0.2, g(100)=0.4, the figure generated is:

https://dl.dropboxusercontent.com/u/4041338/Fig1131_initval_file_smooth.jpg

which looks like a smoothed version of the former figure.

Up to this point, I’m not sure whether it is because ‘’ initval_file ‘’ is only suitable for temporary change rather than permanent change of exogenous variables, or just because I use this command in a incorrect way?

Come back to the old question, how can I correctly implement this smooth transition in Dynare? suppose g = 0.2*exp(.99639478.^(n-1)-.95.^(n-1)) as before.
Fig1131_Jonas_initval_file_data1.m (347 Bytes)
Fig1131_Jonas_initval_file_data.m (318 Bytes)
Fig1131_Jonas_initval_file.mod (1.46 KB)

Do you mean the file at
[Practicing dynare sargent chapter 11)

It is more likely to be that the problem is not explained clearly at the beginning, but now I figure it out. Exactly as Johannes said at the beginning, it can be done by just using ‘’ shocks ‘’ as in Stéphane’s old code gist.github.com/stepan-a/6974512, or using ‘‘initval’’ and ‘‘endval’’, or using ‘‘initval_file’’. The key is just the transition graph’s period taken should be less than specified path’s period in Dynare, as using ‘’ shocks ‘’ means the transition parameter goes back to 0 after the specified path, ‘’ initval_file ‘’ means it goes back to initial value , ‘‘initval’’ and ‘‘endval’’ means it stays at the last value of the path, thus, the latter part of the graph will always have some funny shape.