Sunday, June 26, 2011

A beautiful day!

No pictures or equations---just a huge sigh of relief. I finally managed to export data from my agent-based model and get it into Stata statistics software for analysis. The thing that was holding me up was that the attribute data for the 604 parishes in the SW of England is held in polygons....and when those polygons are imported into the Netlogo agent-based model, some of the data "disappears" or reappears in a corrupted form, which is even worse. I converted the polygons to points and that does the trick.

So---the agent - based model calculates the closest market-town for each farmer, and tells the farmer its population. Then exports that data so I can work out the effect of distance and population. Sounds simple doesn't it...

Anyway, I found that we have an interesting "gravity" model here, where the gravity equals the population divided by the square root of the distance. This declining effect makes sense: the average cost per unit distance was higher for shorter distances because of the fixed costs of loading and unloading all those sacks of grain.

It is days like these that I live for.