## Friday, November 21, 2014

### Columns in a spreadsheet go up-and-down, like columns in a building. Rows go across.

Following up on the post of 18 November...

When I picture an economic model, I picture doing it in a spreadsheet. I need a column for "Year", one for "GDP", one for "Debt", one for "Addition to Debt", and stuff like that -- whatever it turns out that the calculation seems to need. And then, make a row for each year of the model's life. I plug in a few numbers on the top row, then fill the rest of the first couple rows with calculations. And that's it.

I copy my last completed row down to the rows below, for each year of the model's life, 50 years maybe.

The trick is to plug in the right calculations. Those calcs want to mimic the actual relations between GDP and Debt and Additions to Debt and stuff, or what I imagine those relations to be. You know: If we spend a little less, we save a little more this year, but our reduced spending could affect GDP next year. Those kinds of relations.

When the bug bites I'll set up a spreadsheet like that and mess with it for a while, changing calculations, adding columns for new quantities, and looking at graphs of the resulting data.

I never manage to get graphs that mimic graphs of economic data. So I play with it for a while, then set it aside.

After I wrote the notes above, I went and read the first few pages of Clopper Almon's The Craft of Economic Modeling. Actually, Clopper says "The first section of chapter 1 does not require the use of computers." I printed out those six pages, so I could hold them in my hand.

Looking at the equations like

C = .6*Y[1] + .35*Y[2]

and

Q = C + I + G + X - M

where C is Consumption and Q is output, it occurred to me that each of the equations in the model could fit to a column of my spreadsheet. You copy the equation down the cells of the column to get each year's number. Oh -- you leave out the Q to the left of the equal sign, and you put the equation in the column that you have labeled Q!

Do you know how long it took me to figure that out???

So each of the equations in a model can be a column in a spreadsheet. Understanding this helps me understand economic models. What I've been doing for all these years is making a column for each variable I want to calculate, and then fudging the equations without ever really getting to look at the equations. I would start out with something that made sense to me, and keep filling in blanks until I had two or three rows worked out, then copy the last row down to represent 50 years or so, and then graph it.

Then I'd look at the graph, decide it didn't look right, and start tweaking my equations. First it would be adding columns to get more variables, and then working those variables into calculations and copying them to the rows below. Then it was things that made less sense, but might have some bearing. After a while it would be acts of desperation, just trying to come up with numbers that would produce a graph I could live with. And then I'd put the thing aside for a while.

I think it's probably better to pull out the equations so you can look at them like Clopper does, like I always see when somebody is describing a model.

But at least now I know: If there's two equations I need two columns in a spreadsheet for variables; if there's six, I need six.

No, no -- I'm not going to work only in spreadsheets. I want to download the free G7 software and learn how to use it. But I have to get there at my own pace. And I have to start with what I know.

Spreadsheets it is, then.