model

model — declares the model equations

Synopsis

model [ (linear) ] ;
(1) MATLAB EXPRESSION;
[ (1) MATLAB EXPRESSION; ...]
end; (2) EQUATION;
[ (2) EQUATION; ...]
end;

(1) #EXPRESSION [= #EXPRESSION] ;

(2) EXPRESSION [= EXPRESSION] ;

Description

The equations of the model are written in a block delimited by model; and end;.

There must be as many equations as there are endogenous variables in the model, except when used to compute the unconstrained optimal policy with olr. The lead and lag of the variables are written in parenthesis immediately after the variable name. Leads or lags of more than one period are allowed. All the functions available in Matlab, Scilab or Gauss, respectively, are recognized. Each equation must be terminated by a semicolon (;).

When the equations are written in homogenous form, it is possible to omit the "= 0" part and write only the left hand side of the equation.

It is possible to include arbitrary Matlab expressions in a model. It must be preceeded by a pound sign (#) as the first character of the line. This is particularily usefull to declare tansformation of parameters for estimation purpose (see estimated_params).

The option linear declares the model as being linear. It avoids to have to declare initial values for computing the steady state and it sets automatically order=1 in stoch_simul.

Example 1

model;
c =  - k + aa*x*k(-1)^alph + (1-delt)*k(-1);
c^(-gam) = (aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam)/(1+bet);
end;

Example 2

model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
c^(-gam) - (aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam)/(1+bet);
end;

Example 3

model(linear);
# b = 1/c;
x = a*x(-1)+b*y(+1)+e_x;
y = d*y(-1)+e_y;
end;