| 1 |
// --+ options: nostrict +-- |
| 2 |
|
| 3 |
/* |
| 4 |
** Same as ex5.mod, but price is treated as an exoenous variable. |
| 5 |
*/ |
| 6 |
|
| 7 |
parameters a0, a1, b0, b1; |
| 8 |
|
| 9 |
a0 = 1.0; |
| 10 |
a1 = 0.1; |
| 11 |
b0 = 0.5; |
| 12 |
b1 = 0.2; |
| 13 |
|
| 14 |
model; |
| 15 |
|
| 16 |
[endogenous='D'] |
| 17 |
D = a0 - a1*p; |
| 18 |
|
| 19 |
[endogenous='S'] |
| 20 |
S = b0 + b1*p; |
| 21 |
|
| 22 |
//[endogenous='p'] |
| 23 |
//S = D; |
| 24 |
|
| 25 |
end; |
| 26 |
|
| 27 |
if ~isequal(length(intersect(M_.endo_names, {'D'; 'S'})), 2) |
| 28 |
error('Endogenous variables are wrong.') |
| 29 |
end |
| 30 |
|
| 31 |
if ~isequal(M_.exo_names, {'p'}) |
| 32 |
error('Exogenous variables are wrong.') |
| 33 |
end |