[From Bill Powers (2003.02.08.0702 MST)]
Bill Williams UMKC 8 Feburary 2003 0:45 AM CST --
>I think my experience with the interlocking-directorates program may
provide some >guidance for how to proceed with the Econ project.
Thanks for that illuminating, if alarming, story about your development of
the Prolog program. It's truly a jungle out there. All I can say is, let's
try to make a small clearing within which we can start a civilization. I
think people resort to irrationality and narrowmindedness only when they
have lost their confidence in being able to know or do anything of
significance. Psychologists have given up on understanding people;
economists have given up on understanding the economy. When you have given
up on substance, all you have left is form. It's like a steady diet of
meringue.
Let's begin exploring Econ004 by looking at the wage-earner. I have said
that a wage-earner uses hours of work to obtain money, and uses money to
obtain goods and services ("goods" for short). That seems clear enough, but
there are some problems with these assumptions which we will come to in due
time. Let's begin by seeing what the program says about the wage-consumer,
the consumer who works for his money.
First, goods and money. The wage-consumer, or Cw, has a reference level for
maintaining the wage-household inVentory of goods, Vw, at a reference level
refVw. Why not start by saying the consumer wants to consume at a given
rate? I can think of many rationalizations, but the basic reason is that we
need a cumulative variable somewhere in the loop into which and from which
all the flows, or rates, can come and go. The consumer is going to be using
so many goods per day, so the store of goods is depleted at that rate; to
replace those goods, the consumer must purchase the same number of goods
per day. At the same time, there is a goal, refVw, for how many goods are
to be in the wage-consumer's possession. Some of these are durable goods
like houses and cars; others dwell in inventory for only a short time:
food, medicine, gasoline, and so on. Others disappear almost at the same
time they are purchased: movies, music, train tickets. Some goods are gone
before they can be used; depreciation (in the physical, not accounting,
sense).
If Gw is the rate at which goods are acquired by a wage-consumer, Uw is the
rate at which they are used, and Dw the rate at which stored goods
depreciate, we can write a differential equation describing the time rate
of change of wage-consumer inventory:
d(Vw)/dt = Gw - Uw - D*Vw, or
d(Vw) = (Gw - Uw - D*Vw)*dt
To convert this into an integral equation for simulation purposes, we
integrate both sides of the equation, and express the integration process
in terms suitable for a program (an Euler integration in this case, a fancy
word for the simplest kind):
Vw := Vw + (Gw - Uw - D*Vw)*dt;
The first Vw on the right side is the initial value of inventory; to that,
we add the daily rates of increase and decrease of inventory, multiplying
by dt, the fraction of a day over which we are calculating the accumulation
and loss. Not having to please mathematicians, I use dt throughout, even
though I should start with a delta-t and then let its size decrease to
zero. We use a dt small enough that making it any smaller will not change
the results noticeably.
This equation, strictly speaking, is not about the agent, the
wage-consumer, but about the household operated by that composite person.
It doesn't matter who accumulates and uses goods; if they are used and
accumulated and lost at the specified rates, the inventory will increase
and decrease as shown because of conservation of matter, not because of
psychology.
The agent is introduced when we speak of an inventory goal and what is done
to make actual inventory match it. The controlling agent, or the part of
the human wage-consumer that carries out control of inventory, is shown by
these equations:
errorVw := refVw - Vw;
OutputVw := GainVw*errorVw;
This is a simple proportional control system: the magnitude of output
action is proportional to the momentary error between the actual amount of
inventory Vw and the reference amount refVw. Note that we assume that the
perception of Vw is numerically equal to the actual size of Vw.
What does this output activity cause in the environment of the control
system? In
Econ004, it causes a certain rate of acquisition goods, this rate
symbolized as Gw.
All conversion factors are contained in gainVw. The consumer acquires goods
at a rate proportional the difference between current inventory and the
desired level of inventory.
This has the happy and not unanticipated result that this control loop
contains a single integrator. Control loops with a single integrator and no
transport lag are unconditionally stable for any amount of gain. When
represented in a computer, so that dt cannot really be infinitestimal, the
limit on gain is set only by dt; if gain is too high, computational
oscillations will set it, one full cycle every two iterations. If it is
necessary to use a still higher gain to match performance with that of a
real system being simulated, the solution is to reduce dt sufficiently to
eliminate the computational oscillations (at the expense of needing more
iterations of the program to cover each unit of time).
If the real system contains a transport lag, and its performance is limited
by that lag, then we need to incorporate a corresponding lag in the model.
Normally we would choose a dt that is perhaps 1/10 or less of that lag, so
its size will not influence the results. Otherwise, the size of dt has
nothing to do with time-lags in the real system; it is simply the penalty
we pay for using a digital computer instead of a real analog computer.
We now have a control system that keeps the wage-household inventory Vw
near the wage-consumer's reference level refVw by varying the rate at which
goods are purchased. How near depends on the control system's gain and on
the two disturbances: Uw, which subtracts from Vw, and Dw, which substracts
a fraction of the remaining Vw fron Vw. For a steady state, the rate of
acaquisition, Gw, must equal Uw + Dw*Vw. If the gain is low, a large error
is needed to bring Gw high enough to cancel the two rates of loss. If gain
is high, only a small error is needed for equilibrium. The parameter gainVw
therefore determines how tight control of inventory will be, and can be
adjusted to make the model's performance match observations.
When the wage consumer buys goods at a certain rate Gw, measured in goods
per day, this requires that money be spent at a rate Gw*P, measured in
dollars per day, where P is the price per good in dollars. Dollars per good
times goods per day equals dollars per day. It is often useful to keep
track of units as a reality check.
The money spent comes from the second variable controlled by the
wage-consumer, the cash Reserve. The cash reserve Rw is an account into
which money flows as income, Yw, and out of which money flows as expenses,
Xw. Since Econ004 does not include interest as yet, the differential
equation for the reserve is
d(Rw)/dt = Yw - Xw, or
d(Rw) = (Yw - Xw)*dt,
where Yw and Xw are flows measured in dollars per day, and dt is the
fraction of a day over which the change is measured. In integral form for a
model, we have
Rw := Rw + (Yw - Xw)*dt
Again, this is a property of the household, not of the wage-consumer. The
amount of money in an account is equal to the initial amount plus the rates
of income and expenditure per day, times the fraction of a day over whyich
the accumulation is measured.
The rate of expenditure of money, Xw, is determined by how fast goods are
being bought, which is set by the other control system, the inventory
control system:
Xw := Gw*P,
where Gw is the rate of acquisition of goods, and P is the price per
good, as discussed above.
The wage-consumer has a reference level for the amount of cash Reserve that
is to be maintained, refRw. The control system is
errorRw := refRw - Rw;
outputRw := gainRw*errorRw;
Again, a simple proportional control system, leaving the control loop with
a single integrator in it.
The output action outputRw of this system will have its effect on the reserve
Rw by varying the income, Yw. If we wanted to postpone the problem of where
income comes from, we could just say
Yw := K*outputRw,
with K being an arbitrary constant. But we can be more specific: if Nw is
the fraction of a day worked per day, and W is the wage in dollars per day,
then the income will be
Yw := Nw*W
and we can say that
Nw := outputRw,
closing the loop.
We see now that the wage consumer in Econ004 maintains a certain level of
cash reserve by working as many hours (in fractions of a day) as necessary,
and purchases goods at whatever rate is needed to maintain a given
inventory of goods. The level of the inventory is affected by usage and
depreciation; the level of cash reserves is affected by the rate of buying
goods at a given price and by the hours worked at a given wage.
Because these computations are done over only a very short time interval
dt, it can be assumed that reference levels, wages, and prices are
essentially constant at their average values during the interval. So the
program can compute the states of all the variables, including any small
changes in prices, wages, and reference levels, and then update all the
variables before doing the next computation for the next small interval of
time. When nothing changes abruptly, this is a valid approach and will
yield accurate results. For very rapid or instantaeous changes, other
approaches are needed which we can explore when or if such circumstances arise.
Summing up the equations for the wage-consumer, we have
===============WAGE-CONSUMER INVENTORY CONTROL
AGENT
errorVw := REFvW = vW;
outputVw := gainVw*errorVw;
OUTPUT INTERFACE
Gw := outputVw {effect on inventory}
Xw := Gw*P; {effect on cash reserve}
ENVIRONMENT or HOUSEHOLD
Vw := Vw + (Gw - Uw - Dw*Vw)*dt;
===============WAGE-CONSUMER CASH RESERVE CONTROL
AGENT
errorRw := rfefRw - Rw;
outputRw := gainRw*errorRw;
OUTPUT INTERFACE
Nw :- outputRw;
Yw := Nw*W;
ENVIRONMENT or HOUSEHOLD
Rw := Rw + (Yw - Xw)*dt;
There endeth the lesson. After this is assimilated we can discuss some
problems with the assumptions, the main one being the assumption that the
wage-consumer can vary hours of work at will. We could say that the model
correctly represents what would happen if this were true, but the question
is, what other arrangements are likely?
Best,
Bill P.