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

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.

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

Postby tovie » Sun Feb 16, 2014 9:21 pm

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
tovie
 
Posts: 2
Joined: Sun Feb 16, 2014 9:15 pm

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

Postby jpfeifer » Mon Feb 17, 2014 9:04 am

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
------------
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

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

Postby tovie » Mon Feb 17, 2014 10:41 pm

Okay now I got the concept and it works. Thank you very much!

Best
tovie
 
Posts: 2
Joined: Sun Feb 16, 2014 9:15 pm


Return to Dynare help

Who is online

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