Monday, November 24, 2014

"The first section of chapter 1 does not require the use of computers"

Today's title is a quote from The Craft of Economic Modeling, Part 1 (PDF), by Clopper Almon. I take the quote to mean that I don't have to begin by getting into the modeling software they call G7. I take it to mean I can start with a spreadsheet. Not pencil and paper and slide rule.

Page six of The Craft presents Table 1.1, a table of data to use for the first simulation. For the first model, I mean. Ten columns of numbers. Most of them are incomplete. The first column (which is complete) contains the numbers 1 thru 24, in order. It is labeled "Line" (meaning 'row number') but I take it to represent years 1 thru 24 of the simulation I'm going to create.

Three other columns are also complete, each with 24 values. Here we have numbers that are predetermined and invariant, regardless of how the simulation works out. These complete columns hold "exogenous" values. Those values don't depend on the outcome of the simulation.

In each of the six remaining columns, only the first few numbers are filled in. These are starter values. A lot of them are used by the calculations of the model -- used by calculations to fill in the blanks where numbers are not given.

The calculations produce "endogenous" values. If things go a little differently in the simulation -- if you change an exogenous value or if you change a calculation, say -- the endogenous numbers will probably all change.

When I put the numbers into a spreadsheet, I switched over to calculations as soon as I could. That way I could compare my calculations to some of the givens, and check my work. In the Zoho spreadsheet, I show the numbers in blue if I used given values, and black if I used calculations. The table of numbers starts just below this graph:

Check my work. I was expecting my graph to come out like the one on page 5 --

But I only got two growth spurts. They got five. I checked my work and didn't see any mistakes. (Oh, there were mistakes. But you look at the graph and see the date when it seems to go crazy, and then you check your calculations on the rows around that date. And you fix 'em before you put it on your blog.) I think I got all the mistakes, but if you find anything fishy, let me know.

I'm assuming the page 5 graph was generated from different data, and that's why the graphs don't match.

If you create the model yourself, do let me know how it comes out.

Note: When you enter the equations it's easy to use the wrong column. It's easy to confuse spreadsheet columns with economic data category columns. For example, the last spreadsheet column used here is column J, which contains economic data column Y, Disposable Income. It's a little messy, keeping it straight. But if you don't do it right you'll know, because your graph won't look right.

// This series of posts began on 18 November 2014.