diff --git a/tests/example1_on_the_fly.mod b/tests/example1_on_the_fly.mod index 7e40f384b9b45b6c13853e1dd21e6fc91815f511..fd0786eda8e857cb3e190c7d181e6f850734dc27 100644 --- a/tests/example1_on_the_fly.mod +++ b/tests/example1_on_the_fly.mod @@ -1,10 +1,24 @@ -// Example 1 from Collard's guide to Dynare +// --+ options: nostrict +-- +/* +** In the following example, the types (exogenous variable, endogenous variable, parameter) of the objects appearing in the model are declared +** on the fly in the equations. With the nostrict option, an object is by default an exogenous variable (if the type of an object is not declared +** in one of the equations, it will be interpreted as an exogenous variable). Without the nostrict option, Dynare will raise an error if the model +** contains untyped objects. +** +** An object followed by |e is an endogenous variable, +** |x is an exogenous variable, +** |p is a parameter. +** +** Example. If the first equation (consumption/leisure arbitrage) is removed from the following model block, then h (hours) +** will be interpreted as an exogenous variable. +*/ + model; -c|e*theta|p*h|e^(1+psi|p)=(1-alpha)*y; +c*theta|p*h|e^(1+psi|p)=(1-alpha)*y; k|e = beta|p*(((exp(b)*c)/(exp(b(+1))*c(+1))) *(exp(b(+1))*alpha|p*y(+1)+(1-delta)*k)); y|e = exp(a)*(k(-1)^alpha)*(h^(1-alpha)); -k = exp(b)*(y-c)+(1-delta|p)*k(-1); +k = exp(b)*(y-c|e)+(1-delta|p)*k(-1); a|e = rho|p*a(-1)+tau*b(-1) + e|x; b|e = tau|p*a(-1)+rho*b(-1) + u|x; end;