FRML

Examples

FRML defines equations for TSP. These equations can be used later in the program for estimation, simulation, or they may simply be saved for later computation. The ANALYZ, DIFFER, LSQ, FIML, SIML, ML, EQSUB, and SOLVE procedures all require equations specified by FRML or FORM (PARAM) as input. GENR and SET can also take a FRML name as an argument.

FRML <equation name> <variable name>=<algebraic expression> ;

or

FRML <equation name> <algebraic expression> ;

Usage

There are two forms of the FRML statement: the first has the name to be given to the equation, followed by an equation in normalized form, that is, with the name of the dependent variable on the left hand side of the equal sign and an algebraic expression for that variable on the right hand side. The expression must be composed according to the rules given in the Basic Rules section which introduces this manual. These rules are the same wherever an equation is used in TSP: in IF statements, GENR, SET, FRML, IDENT, SMPLIF, SELECT, and GOTO. DOTted variables can be used in FRMLs.

The second form of the FRML statement is "implicit": there is no equal sign but simply an algebraic expression. This is used for fully simultaneous models, where it might not even be possible to normalize the equations. The ANALYZ, FIML, LSQ and SIML procedures can process implicit equations.

Equations defined by FRML are the same as those defined by IDENT except that the estimation procedures assume that a FRML has an implied additive disturbance tacked on the end, while an IDENT does not. If the FRML is not normalized, it is treated as being equal to the implied disturbance. The distinction is useful only in FIML, where identities may be necessary to complete the Jacobian (to ensure that it is a square matrix).

An equation defined by a FRML statement can contain numbers, parameters, constants, and series. The equation can always be computed at any point by use of GENR (see GENR for the form of the statement). When it is computed, the parameters and constants are supplied with their current values before computation, and the equation is computed for all the values of the series in the current sample.

Examples

These are the equations which are used to estimate the illustrative model by three stage least squares in LSQ:

FRML CONSEQ CONS=A+B*GNP ;

FRML INVEQ I=LAMBDA*I(-1) + ALPHA*GNP/(DELTA+R) ;

FRML INTRSTEQ R=D+F*(LOG(GNP)+LP-LM) ;

FRML PRICEQ LP = LP(-1)+PSI*(LP(-1)-LP(-2))+PHI*LOG(GNP)+TREND*TIME +P0;

In these equations, the dependent variables are CONS, I, R, and LP. The other series are GNP, LM, and TIME. Note the use of lagged series in the equation also. The other variables, A, B, LAMBDA, ALPHA, DELTA, D, F, PSI, PHI, TREND, and P0, are parameters and constants. The first FRML could be written in unnormalized (implicit) form as its residual:

FRML CONSEI CONS - (A+B*GNP) ;

When the dependent variable is actually an expression, the unnormalized form is required. The following FRML is invalid:

FRML EQNL LOG(Y) = A + B*X ;

It should be rewritten as an implicit FRML (for use in FIML or SIML):

FRML EQNL LOG(Y) - (A + B*X) ;

Here are some more examples; see the DIFFER section also for examples using the normal density and cumulative normal function.

FRML ZERO A72-A73 ;

FRML TRIGEQ COSX = COS(X) ;

FRML TRIGEQ2 COSXY = X*Y/(X*X+Y*Y)**0.5 ;

FRML RCONSTR RHO = (2/PI)*ATAN(PARAM) ;

See the DOT command for an example of defining several similar FRMLs in a DOT loop.