I'm having a strange problem when I do unit check. Here is the print out:
***********************************************
***********************************************
Error in units for the following equation:
Consecutive Quarters of High Realized Profit =
INTEG( high profits tracker
- low profits tracker ,
0)
Consecutive Quarters of High Realized Profit --> Dmnl
Analysis of units error:
Right hand and left hand units do not match
Consecutive Quarters of High Realized Profit
Has units: Dimensionless
INTEG( high profits tracker
- low profits tracker ,
0)
Has units: Quarter
***********************************************
Error in units for the following equation:
Speculative Expectation of Profits =
INTEG( exuberance
- disappointment ,
0)
Speculative Expectation of Profits --> Dmnl
Analysis of units error:
Right hand and left hand units do not match
Speculative Expectation of Profits
Has units: Dimensionless
INTEG( exuberance
- disappointment ,
0)
Has units: Quarter
***********************************************
***********************************************
Here's the problem--none of the variables actually has the dimension "Quarter." It did at one point, but I changed it. Here is the model:
http://www.econ.tcu.edu/harvey/JTHarvey.mdl
Please forgive the mess as I'm in the middle of a big revision. I actually might not even keep the portion where the error occurs (bottom left), but it's bothering me. Any idea what's wrong?
Thanks!
John
[Edited on 3-24-2010 by RommelDAK]
Error in Unit Check--I'm not even using that dimension!
Error in Unit Check--I'm not even using that dimension!
John T. Harvey
Professor of Economics
Texas Christian University
Professor of Economics
Texas Christian University
unit check
Hi
You do not nedd to use the quarter unit to get the error.
The quarter unit is the time unit of your model.
Vensim calculated that the variable should have a quarter unit instead of a dimensionless one.
Analysis of units error:
Right hand and left hand units do not match
Consecutive Quarters of High Realized Profit
Has units: DIMENSIONLESS (the unit you assigned to the variable Consecutive Quarters of high Realized Profit)
INTEG( high profits tracker
- low profits tracker ,
0)
Has units: QUARTER (the unit that it should have taken into account the equatiion and the DMNL unit you assigned to high profits tracker and low profits tracker.
Regards.
JJ
You do not nedd to use the quarter unit to get the error.
The quarter unit is the time unit of your model.
Vensim calculated that the variable should have a quarter unit instead of a dimensionless one.
Analysis of units error:
Right hand and left hand units do not match
Consecutive Quarters of High Realized Profit
Has units: DIMENSIONLESS (the unit you assigned to the variable Consecutive Quarters of high Realized Profit)
INTEG( high profits tracker
- low profits tracker ,
0)
Has units: QUARTER (the unit that it should have taken into account the equatiion and the DMNL unit you assigned to high profits tracker and low profits tracker.
Regards.
JJ
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
go to Model>Setting and check to see what units you are using for Time - Vensim thinks it is Quarter and that means a flow with units of xx will be associated with a level with units xx*Quarter. If the flow is dimensionless, the level will be Quarter. Normally profit has units Currency/Time (eg $/Quarter).
I think the problem may be a bit deeper than that, but it's definitely related. It's not Currency/Time, incidentally, because it's not profit, but a count of the number of consecutive quarters that profits have been "high" (a subjective value that agents use to determine how well investments have been performing). Maybe that's not a proper use of the flow/level structure? It works perfectly in terms of the behavior it creates, but that structure may be causing other problems.
Thanks all! That gives me something to go on.
Thanks all! That gives me something to go on.
John T. Harvey
Professor of Economics
Texas Christian University
Professor of Economics
Texas Christian University
As I look at this more closely, I'm beginning to see that that's the problem. I'm using the traditional flow-level structure for something other than that for which it was designed.
What I am after is to model the manner in which investors' spontaneous optimism rises cumulatively during an expansion. As realized profits exceed what they generally expect to earn, so investors become more and more excited. Their increasingly-unrealistic expectations are inevitably disappointed and panic and collapse result.
I made the increasingly-unrealistic expectations a nonlinear function of how many consecutive quarters profits have been "high." To get the latter, I created a "high profits tracker," which was simply an if-then that generated a 1 for a single high profits quarter. It is a flow that feeds into Consecutive Quarters of High Realized Profit. Thus, if there are three high-profits quarters in a row, high profits tracker would generate three 1's and Consecutive Quarters of High Realized Profit will equal three. If there is ever a low profits quarter, the if-then in low profits tracker is triggered and Consecutive Quarters of High Realized Profit is flushed empty to zero (by setting outflow at the current value of Consecutive Quarters of High Realized Profit).
I did something similar with disappointment/Speculative Expectations of Profit/exuberance, but it's the exact same structure so I won't go into that.
Sorry for so much detail, but my basic question is whether or not what I've done should be set up in a different format, or am I simply missing the obvious way to set the dimensions so as to eliminate the units check errors?
John
[Edited on 3-24-2010 by RommelDAK]
What I am after is to model the manner in which investors' spontaneous optimism rises cumulatively during an expansion. As realized profits exceed what they generally expect to earn, so investors become more and more excited. Their increasingly-unrealistic expectations are inevitably disappointed and panic and collapse result.
I made the increasingly-unrealistic expectations a nonlinear function of how many consecutive quarters profits have been "high." To get the latter, I created a "high profits tracker," which was simply an if-then that generated a 1 for a single high profits quarter. It is a flow that feeds into Consecutive Quarters of High Realized Profit. Thus, if there are three high-profits quarters in a row, high profits tracker would generate three 1's and Consecutive Quarters of High Realized Profit will equal three. If there is ever a low profits quarter, the if-then in low profits tracker is triggered and Consecutive Quarters of High Realized Profit is flushed empty to zero (by setting outflow at the current value of Consecutive Quarters of High Realized Profit).
I did something similar with disappointment/Speculative Expectations of Profit/exuberance, but it's the exact same structure so I won't go into that.
Sorry for so much detail, but my basic question is whether or not what I've done should be set up in a different format, or am I simply missing the obvious way to set the dimensions so as to eliminate the units check errors?
John
[Edited on 3-24-2010 by RommelDAK]
John T. Harvey
Professor of Economics
Texas Christian University
Professor of Economics
Texas Christian University
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi John,
I would actually use something mode like the original formulation.
Consecutive Quarters of High Realized Profit= INTEG (
high profits tracker-low profits tracker, 0)
Units: Quarter (which is exactly right when you think about it)
Low profits tracker=
IF THEN ELSE(realized profits from investment>low profits defined, 0,
-Consecutive Quarters of High Realized Profit/TIME STEP)
Units: Quarter
This will actually work with a TIME STEP less than one, assuming that low profits defined is less than high profits defined. This does, require Euler Integration, but will probably be more readable than using the DELAY FIXED formulation.
I would actually use something mode like the original formulation.
Consecutive Quarters of High Realized Profit= INTEG (
high profits tracker-low profits tracker, 0)
Units: Quarter (which is exactly right when you think about it)
Low profits tracker=
IF THEN ELSE(realized profits from investment>low profits defined, 0,
-Consecutive Quarters of High Realized Profit/TIME STEP)
Units: Quarter
This will actually work with a TIME STEP less than one, assuming that low profits defined is less than high profits defined. This does, require Euler Integration, but will probably be more readable than using the DELAY FIXED formulation.