Message Boards Message Boards

0
|
6319 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

How to simulate a recursive model from a list

New to mathematica, trying to use Eric Swanson's Pertubation AIM program to solve DSGE models. His code produces a solution as a list or a table. My question is how do I use this list to simulate the model without copying and pasting stuff? For the one sector stochastic growth model, the solution (as a list) appears as:
{A == 0.800000000000000 A[-1 + t] + 1.00000000000000 eps,
C == 0.1114834992288968 + 0.292723851887318 A[-1 + t] +
0.1186384419679934 Inv[-1 + t] + 0.447062121415789 K[-1 + t] +
0.365904814859147 eps,
Inv ==
0.4186970784697240 + 0.902059574107021 A[-1 + t] -
0.0225290917630828 Inv[-1 + t] - 0.0848957841160119 K[-1 + t] +
1.12757446763378 eps,
K == 1.431977509390795 + 0.238836154208396 Inv[-1 + t] +
0.900000000000000 K[-1 + t],
r == 0.01010101010101003 + 0.0880808080808080 A[-1 + t] -
0.01840727127888952 Inv[-1 + t] - 0.0693636363636363 K[-1 + t] +
0.110101010101010 eps,
Welf == -988.913562642210 + 5.22803270579111 A[-1 + t] +
0.893524510010050 Inv[-1 + t] + 3.36704491694070 K[-1 + t] +
6.53504088223889 eps,
Y == 0.4295932528172384 + 0.800000000000000 A[-1 + t] +
0.0716508462625189 Inv[-1 + t] + 0.270000000000000 K[-1 + t] +
1.00000000000000 eps}

All variables except investment (Inv) are in logs. eps is the technology shock (i.e., A=0.8*A[t-1]+eps where A is log total factor productivity).
I also have a list of steady state values {0, 0.1114834992288968, 0.4186970784697240, 1.431977509390795, \
0.01010101010101003, -988.913562642210, 0.4295932528172384}.

So my question is, given these lists, how do I assign the steady state as starting values for the model, assign a random sequence to eps, and simulate the model? Really appreciate any help that you can give.
POSTED BY: Nelson Mark
2 Replies
I ran the model. Pretty cool. Again I would suggest using Manipulate to make simulations.
POSTED BY: Manuel Molano
The vector of steady state values: Do they correspond to the variables in the same order as the equations? {A, C, Inv, K, r, Welf, Y}?

Your question is: how do I use this list to simulate the model. Have you tried doing Plot and Manipulate in order to see a graphical simulation?

I don't know Mr. Swanson's perturbation method. From what I read in his website it is pretty much similar to a Taylor series approximation. Have you tried using DSolve or NDSolve to attempt a solution of the system?
POSTED BY: Manuel Molano
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract