Page 1 of 1

Wrong calculations in an AR(2) process. Bug in dynare?

PostPosted: Sun Feb 16, 2014 9:21 pm
by tovie
Dear everyone,

I am trying to rebuild a model (manually log-linearized) and therefore need an AR(2) process to simulate the effect of a fiscal stimulus.
Unfortunately dynare does not compute the correct values in the time series. It is a non-stochastic model. Therefore I use an initial value.
I assume a government spending of 0.32:

initval;
g = 0.32;
end;

and use the following model equation:

model(linear);
g = 1.653*g(-1)-0.672*g(-2);
end;

Since the first value is already given g(1) should be the inital value of 0.32 which actually works.
The following values of the time series (manually calculated) should be

0.5290
0.6594
0.7345
0.7710
0.7809

But dynare creates a series with:

0,313996800000000
0,304073510400000
0,291703022323200
0,277920674553945
0,263448452761839

I tried a lot, but it seems dynare doesn't calculate the values if one of the multipliers is larger than one.
Is this a bug or am I doing something wrong? I am using the latest dynare release 4.4.1.
Thanks for your help.

Best

Florian

Re: Wrong calculations in an AR(2) process. Bug in dynare?

PostPosted: Mon Feb 17, 2014 9:04 am
by jpfeifer
You are confusing what initval does. It sets the initial conditions for t=-1 and t=0 to 0.32, not the one at t=1. Dynare is correct in giving you:
Code: Select all
g(1)=0.32;
g(2)=0.32;
for ii=3:7
    g(ii) = 1.653*g(ii-1)-0.672*g(ii-2);
end

Re: Wrong calculations in an AR(2) process. Bug in dynare?

PostPosted: Mon Feb 17, 2014 10:41 pm
by tovie
Okay now I got the concept and it works. Thank you very much!

Best