Posts

Showing posts from December, 2014

Use Your Models, Don't Believe in Them!

I formulated this principle when I was programming mathematical models of financial markets. I noticed that my colleague who generated the models (that I then implemented) was never particularly attached to them. He would run them so long as they were indicating profitable trades, and then abandon them when they stopped. I was also writing Economics for Real People at that time, and grappling with the issue of the relevance of mathematical models in the economic world. Noticing the modelers attitude, one day I asked him, "Would you say that our practice is to use our models, rather than to believe in them?" "Absolutely," he replied. Mary Morgan's book reaches a similar conclusion.

Models: What Are They Good For?

"Writing down a model and manipulating it allows economists to think through in a consistent and logical way how a number of variables might interrelate, and to find solutions to questions about such systems. This habit of making and using models extends the powers of the mind to ask questions and explore the answers in complicated cases." -- Mary Morgan, The World in the Model , p. 258

Hayek abandoned methodological individualism

"In his work on the evolution of social orders, Hayek thus abandons the individualist methodology he proposed in the wartime writings, thereby rectifying the inconsistency that that precept implied for the system of his thought." -- Andy Dennis, "Methodological Individualism and Society: Hayek's Evolving View," in Austrian Economic Perspectives on Individualism and Society , p. 18 That is correct.

Naturalism

Now, no one has a patent or copyright on the use of the word "naturalism," so anything one says about what it means can be contradicted somewhere in the works of people who call themselves adherents of naturalism. Therefore I am just going to describe a typical view that I have seen out there : "Nothing exists except the sort of things described in the theories of physics." (That exact definition of naturalism is not given in the Wikipedia entry, but I know I have seen it stated: if this were an academic paper, I would go hunt down the exact place I saw it, but this is just a blog post.) There is a rather obvious incoherence in this idea: One of the things that is very much not described by the theories of physics is.. the theories of physics. (These theories are about quarks and electrons and photons and forces and so on: they never are about theories themselves , or how theories come to exist, or causal relationships between theories, etc.) Therefore, the theor...

Pygmalion comes alive

I actually had an economist tell me the other day that "utility" is a real "thing" out there in the world, and not just a theoretical construct to help economists understand it! Mary Morgan, in The World in the Model , has some good quotes explaining how this sort of thing happens: "(The triumph of modelling) has created a perspectival change in the way economist view their field: they began by looking at the economic world through the lens of their models and ended by seeing their models in the world" (379). "in the process, those small world models of their science became so familiar to economists that now, when economists look at their small mathematical models they see the real world, and when they look at that big real world they see it is a sequence of their small models" (409). You know how when you spend enough time staring at a white circle on a black page, and then look away, you see an after-image as if it is out there in the re...

If you treat your postulates like hypotheses, you wind up talking nonsense

Physics postulates a world explicable under the category of measurable quantities. Any such quantities it finds will be deemed "physical." The fact that everything physics finds is explicable in terms of the physical is not a hypothesis that physicists are testing, it is an assumption of their science. As such it is ridiculous to point to the work of physicists as "evidence" for a philosophy which one may refer to as "naturalism." It is not a flaw of physics or physicists to make this assumption. What forms any particular science is the set of postulates which it makes about the world, and through which it proceeds to investigate the world as it is seen under those postulates. But it is a mistake to forget that these are postulates and not discoveries. Consider an episode like the discovery of the weak nuclear force. Certain measurable phenomena cannot be explained through any of the other known forces. These phenomena have weird characteristics: certai...

An Observable, Reproducible Supernatural Phenomenon

I heard this phrase on some show that was touting the reality of the "supernatural." It is a bit of silliness that plagues both skeptics of and believers in the supernatural. The silliness consists in this: Anything observable and reproducible will be considered natural . When quantum physicists discovered wave-particle duality or non-local effects, things that had never been considered "natural" before, did they declare these things "supernatural"? No, they just said, "Well, nature is stranger than we thought." I am not trying to comment on the existence of the "supernatural" here: I am just noting that asking for or hoping for scientific evidence of the supernatural is absurd: whether or not any such thing as the supernatural exists, there will never be scientific evidence for it , because every sort of thing for which scientific evidence exists will be incorporated into the "natural."

Edgeworth Boxed!

Through the most difficult part, I think: the agents trade their goods until they reach an equilibrium. Here is the Python code that does this, formatted by Blogger, which seems to always want to reduce two spaces to one: """ edgebox_model.py An Edgeworth Box model where two agents trade goods. """ import logging import entity import spatial_agent TRADE = "trade" WINE = "wine" CHEESE = "cheese" GAIN = 1 LOSE = -1 Accept = True Refuse = False def util_func(qty):     """     Later, we want to be able to pass in arbitrary util funcs for each good-trader combo.     """     return 10 - .5 * qty class EdgeboxAgent(spatial_agent.SpatialAgent):     """     Agents who attempt to trade goods to achieve greater utility.     We are descending this from SpatialAgent, because later on we want     traders who can detect local prices but may not know ...

Modeling can highlight real-world difficulties

So I'm making a model of agents who might exchange goods. The initial idea is to have utility function for each good they might have or obtain, as well as a present endowment of each good (which may be zero). Now, for an Edgeworth Box, my initial price model, this is easy: we only have two goods, and we know what they are in advance. But eventually, we would like to have agents discover goods on the market that they know nothing about before encountering a potential seller. So how can they have a utility function for a good before they know it exists? (I have not solved this problem in my model, although I have ideas.) In fact, this reflects a problem that actual market actors face: how can they know how much they want of, or what price to pay for, a good they have never encountered before? As my mentor Israel Kirzner has noted, markets inherently involve discovery.

General solutions to coding problems often take little more time than specific solutions

I am now coding up an Edgeworth Box model, in which two agents will trade goods until they reach an equilibrium distribution. Now, in the Edgeworth Box, there are only two agents, and each of them only has one good to start with. But there is no need to program those latter two facts into the model: it is pretty much every bit as easy to code a model with N agents and G goods, and let this particular model be a special case where it just so happens that N = 2 and G = 2. It will only add a couple of lines coding to this round to make this code more generalized, while saving me a great deal of work in the future.

Exploring a model

Image
As Mary Morgan notes in The World in the Model , one of the things we do with models is explore them, and hope that exploration tells us something about the world outside the model as well. I appreciate this more and more as I experiment with my agent-based models. Look at the following graph of a run of Adam Smith's fashion model: There are several very interesting things here: 1) Why does the number of followers wearing blue only once drop below the number of trendsetters wearing blue? 2) And why does that drop happen in the second period of the cycle? If I was going to get some one-off behavior from the model, I'd expect it in the first cycle, not the second. 3) And just why is that first cycle so minor compared to the others? 4) And what is going with the trendsetters in that middle stretch where they don't really seem to cycle along with the followers? Here is a larger point to take from this: Have you ever wondered why testing business cycle theories...

A Wise Man's Life

"The latter part of a wise man's life is taken up in curing the follies, prejudices, and false opinions he had contracted in the former." -- Jonathan Swift And the same goes for my life!

Nash equilibrium bleg

Updated with an expanded quote: "If we expand are small world [of the Edgeworth Box], we meet with considerably more difficulties. This expansion goes as follows. Suppose we had Albert's possession of money taken as a starting point, instead of his possession of cheese. And suppose that, after some bargaining, Beatrice is willing to give up to over bottles of wine in exchange for 100 of Albert's guilders. If Albert agrees, the border has resulted in the price of 50 guilders per bottle. That is the so-called equilibrium price. Other individuals, with the same convex characteristics as those of Albert and Beatrice, can now enter our small world and also bid for Beatrice's wine. We can also continue this process by exchanging money against all other goods. Thus, ultimately, it appears that it can be mathematically proven that, where there is free barter, equilibrium prices can be established for all goods. This is the so-called Nash equilibrium..." -- Arnold Merki...

Setting the start-up state of a program

As my agent-based modeling system develops, I am starting to hit the issue of how to uniformly and simply handle things like passing parameters into a program, reading initialization files, and saving program state. I decided I had better read up on this and see how others have handled it. Searching brought up this article , but the writers seem like a couple of knuckleheads, and I am having a hard time understanding what they did

Perhaps you will git my humor

I try to put my changes up to my git repository . It says the push failed, and I should try to do a pull first. So I run the pull command, and I get a message telling me I really ought to explain why the pull is necessary. I felt like typing, "Well, git dude, perhaps you should tell me, because you just told me I ought to do it!"

Why Python overtook Perl

A decade ago, I used Perl quite a bit. It is a very handy language that makes it possible to do many things quickly and easily. Python also allows the accomplishment of many tasks with a few lines of code. It has some weird features that continue to annoy me: having to explicitly declare 'self' as a parameter to every class method while never explicitly passing it is close to the top of the list. Perl had a large head start on Python in terms of users and libraries. And yet Python seems to be passing it by. Why? My tentative answer: while Perl is very useful, it is clunky and cobbled together. Python, on the other hand, while it has its flaws, is beautiful. Human beings are attracted to beauty.

Updating the Christmas classics

We all love those familiar Christmas songs around this time of year. But let's face it, their themes don't resonate with the modern listener like they did with those of the past. So here is my first effort to incorporate more modern charcters into these songs: Rusty the blowman Kept his twenties in a roll With a runny nose and a glass crack pipe And two eyes that never close Rusty the blowman Is a fairy tale, they say, He was made of blow but the crackheads know How he ran out one day. But there must have been some powder in That old dollar bill he found. For when he placed it up his nose He began to dance around! O, Rusty the blowman Was alive as he could be, And the crackheads say he could laugh and play Every morning until 5:30.

Models

I am currently reviewing Mary Morgan's book, The World in the Model . (An excellent book, by the way, and one that shows the value of the history of economic thought for the practice of economics: economists who read it will, I think, have a much better understanding of what modeling is all about.) At the same time, I am busy building agent-based models. It is propitious that these two things are happening at the same time: my own modeling makes me appreciate Morgan's insights much better. In particular, she notes that models are away to explore how the world possibly works by exploring how the model works. The nature of models as something to explore has, I think, been underappreciated. I am fascinated, in working with my model of Adam Smith's theory of fashion, to see how much the results coming out of the model change based on tweaking the assumptions going into it. For instance, changing the amount of time that agents will tolerate a fashion scene not to their liking...

Anti-police violence

Here . American police are way too quick to resort to violence. The figures on the number of people killed by police in the US versus the rest of the developed world are startling. We need real reform here. But demonizing the police as "thugs," "pigs," and so on is no path to reform. It is the path to low-level warfare between the police and those most alienated from our current system. The more hostility towards the police is promoted, the more reason the police will have to fear being killed when dealing with such hostile people, and the more quickly they will resort to violence. And in this struggle, there is no doubt who will come out ahead: The police have resources that those prompted to violence against them simply lack.

Git documentation

Current, in a comment, shared this wonderful parody of git documentation. The unfortunate thing is that the actual git documentation is only a tiny, tiny bit more comprehensible then this spoof. Also, from this and other comments arises a question: is every single regulat reader of this blog except for Bob Murphy a programmer?

White Privilege

Thoreau has a good post on this topic. 99% of the time I have heard the term used, it is a way for very privileged white people to show how superior they are to less privileged white people. For instance, it is a very good way for tenured professors (an extremely privileged class) to bash working class whites. In the struggle of the elites currently underway in the United States, it serves a very useful purpose: if working class whites can be convinced that they are actually "privileged," then maybe they won't notice how all three of the elite factions in the struggle are screwing them over.

Christmas reading recommendations

I recommend British idealism: A guide for the perplexed at The American Conservative Christmas reading list . Obscure, I know, but at least I didn't recommend the Python Cookbook !

Somethings I really don't get

I can understand someone robbing a store. Not that I approve, but it is perfectly comprehensible: they want money, and the store has it. I can even comprehend attacking a store employee who gets in your way. but attacking a baby in the store you were robbing? Was he afraid the baby might testify?

Programmer bleg and rant: Adrift in the amateurish world of open source

Open source software is nice in that it is free, and there are lots of great tools out there. But I'm not sure if developers, often upset by the fact this free software has not swept the field, are aware of how amateurish the design of the user experience often feels. I installed Ubuntu Linux on my Chromebook. (The operation of the Ubuntu GUI itself is very buggy, and it has the same "sophisticated" GUI-look of, say, Windows 3.) Then I began using 'git', a source-code control tool, to place my code in an online repository. The git documentation is pretty terrible: it is written by experts who cannot recall what using git was like when they started out. In other words, if you already know the system well and have forgotten some detail, it is probably excellent, but if you are trying to learn the system, it is incomprehensible. Worse yet, when a command just failed, I tried to pull up help for the command, and found that this attempted to display a 'man...

Adam Smith's fashion cycle, ABM version

Image
So my agent-based modeling system has succeeded in capturing the dynamics of Adam Smith's fashion cycle. Let's start with Smith's description of how fashion works: Fashion is different from custom, or rather is a particular species of it. That is not the fashion which every body wears, but which those wear who are of a high rank, or character. The graceful, the easy, and commanding manners of the great, joined to the usual richness and magnificence of their dress, give a grace to the very form which they happen to bestow upon it. As long as they continue to use this form, it is connected in our imaginations with the idea of something that is genteel and magnificent, and though in itself it should be indifferent, it seems, on account of this relation, to have something about it that is genteel and magnificent too. As soon as they drop it, it loses all the grace, which it had appeared to possess before, and being now used only by the inferior ranks of people, seems to ha...

A marvel of economics…

Is how little understanding there is of the existence of the firm. The fact that there are at least four rival theories in economics explaining its existence is symptomatic of the darkness prevailing in this area. When the average person thinks of "the economy," perhaps the first thing they think of is "businesses." But economics cannot yet explain the existence of these businesses.

The world of physics is an abstract world and not the whole of reality

As Ed Feser notes : "As I have emphasized many times, what physics gives us is a description of the mathematical structure of physical reality. It abstracts from any aspect of reality which cannot be captured via its exclusively quantitative methods. One reason that this is crucial to keep in mind is that from the fact that something doesn’t show up in the description physics gives us, it doesn’t follow that it isn’t there in the physical world. This is like concluding from the fact that color doesn’t show up in a black and white pen and ink drawing of a banana that bananas must not really be yellow. It both cases the absence is an artifact of the method employed, and has nothing whatsoever to do with the reality the method is being used to represent. The method of representing an object using black ink on white paper will necessarily leave out color even if it is there, and the method of representing physical reality using exclusively mathematical language will necessaril...

Come get your agent-based modeling here!

Here . Indra is an agent-based modeling system written in Python and available for download. I just finished coding Adam Smith's fashion model using it, and one of my students is going through Schelling writing up his models using it. Contact me if you would like to try the system, and I will help you get going.

Programmer bleg

I realized that two of my classes were going to use a function identical in all respects except that one of them would test for amount x being greater than amount y, while the other would test for x being less than y. Right now, I have coded the function to accept a boolean parameter I call "gt" which controls an if statement as to which test the function does. But what I really wanted to do was to pass in the operator to use itself. However, generally speaking, programming languages do not accept operators as parameters to functions. Is there a way to do this without the if statement?

The genius of Ken Thompson and Dennis Ritchie

How many pieces of technology developed 45 years ago are now more popular than ever? I thought about this while running some UNIX shell commands in Linux (based on UNIX), which I am running as a alternate operating system on my Chromebook to ChromeOS (based on UNIX). So I picked up my iPhone running iOS (based on UNIX) to write this post, which I will put on Facebook, which runs on UNIX-based servers. Some of my friends will read my post on their Android phones, which run an operating system based on UNIX. Others will read it on their Macintosh computers, which run an operating system... based on UNIX. And the really amazing thing here is that the work of Thompson and Ritchie endured several decades of ridicule before becoming the most ubiquitous piece of software in the world. And the reason for its success is intimately connected to their humility: instead of believing that they knew everything a user would want and building it into a monolithic operating system, they built a minimal...

Agent-based modelling and the vindication of Mises

I've been reading agent-based modelling (ABM) literature the last week, and I am struck by its vindication of Mises's vision of economics. It turns out that to get phenomena like markets, firms, and market-clearing prices, the modelers only have to build agents that: 1) have a purpose 2) have some idea how to achieve it, even if that idea is sub-optimal 3) interact with other agents; and 4) face scarce resources. Well, folks, this is nothing less than the basis of Mises's much reviled "praxeology." Mises just lacked the tools to formalize his vision, but they are here now.

Why is it difficult to detect bugs in agent-based models?

Rob Axtell, in his 2000 paper "Why agents? On the Varied Motivations for Agent Computing in the Social Sciences," attributes the existence of what he calls "artifacts" (program behavior that is not a part of the model being created, but a byproduct of a coding decision which was intended only to implement the model, but actually did something else as well) "partially" to the fact that, in agent models, a small amount of source code controls a large amount of "execution" code. As an example, he offers a system where millions of agents may be created and which might occupy up to a gigabyte of memory, even though the source code for the program is only hundreds of lines long. But this explanation cannot be right, because the causal factor he is talking about does not exist. In any reasonable programming language, only the data for each object will be copied as you create multiple instances of a class. The functions in the agent-object are not copied...

Thoughts on software and hardware

There is no essential difference between software and hardware except the economic difference. The people who put forth metaphors such as "hardware is like the brain and software is like our thoughts" apparently have no understanding of how computers work. Everything that is done in software can be done in hardware. In fact, the way software works is by reconfiguring the hardware. The introduction of the programmable computer was the invention of a machine that could be endlessly reconfigured without having to actually take tools to it and physically adjust its parts. And various features of computers have at various times moved from hardware to software or the reverse: The original Macintoshes could get by with so little RAM because a lot of the operating system was actually put into the hardware. The real difference between software and hardware is that it is cheap to reconfigure software and expensive to reconfigure hardware. So software is simply a way to cheaply and cont...

The chief impetus of new political movements...

Is a rising elite trying to seize control of power from an existing elite. The ideas they use to gain their followers commitment and enthusiasm are what Pareto called "derivations": secondary phenomena of secondary importance.

Idealism to the rescue!

Both "the right" and "the left" suffer from a one-sided focus on an aspect of poverty at the expense of the full picture. The right focuses on agency, and tends to dump the entire blame for their condition on the poor, failing to keep in mind adages like, "There but for the grace of God go I!" The left tends to focus exclusively on circumstances, which winds up denying the poor any agency themselves, and portrays them like shelter animals waiting for a good progressive to come along and adopt them. The reality is that both views are partial truths, each of which needs the other to round out the picture. Although Hegel was somewhat mad at times, teaching us to look at these supposedly irreconcilable divides like this was surely a great contribution to human thought.

Not getting the concept

There are ads running now during the football games saying that "every kid has to play, 60 minutes a day." So "play" is now a duty that has an allotted time scheduled for it in a day full of other duties.

Forgetting Mises When Doing Comparative Political Economy

In the field of Constitutional Political Economy, analysis often starts from the assumption that "political agents act to fulfill their interest just like everyone else." But then the analysis immediately assumes that the interest of political actors consists solely of seeking monetary gain. Since most of the people I read working in this area (for instance, this post is inspired by a paper I am currently refereeing in this field) are at least passingly familiar with Austrian economics, this is a somewhat surprising assumption. One of the things Mises was surely correct about is that "pursuing one's interest," if it is to be a priori true of all agents, must be interpreted extremely broadly. In this sense, as Mises taught us, "one's interest" must include anything that might motivate an agent to act: an aescetic's efforts to abjure all worldly goods, a hero's noble sacrifice of his life for his comrades, and a serial killer's att...

"Anonymous" Refereeing

I have been asked to referee, I'd guess, about 15 papers. In almost every case I have figured out who the author is before finishing the paper, sometimes just by glancing at the bibliography. ("There is no way anyone but Jones would cite Jones 15 times!")