EQUATION Data Type |
In RATS, an EQUATION is an object describing a linear relationship. The information saved as part of an EQUATION is:
•The dependent variable
•The list of explanatory variables, which can include lag fields
•The coefficients
•A series of residuals
•A tag indicating whether it's an identity
•The residual variance
Not all of these will be needed or useful in all situations; in fact, sometimes all that you need out of the equation is the list of explanatory variables.
Creation
You can create equations using an EQUATION instruction, the Equation/FRML Definition Wizard (which creates an EQUATION instruction), or by using the DEFINE option on an Estimation Instruction (most commonly LINREG or BOXJENK). When the EQUATION is created using the DEFINE option, all of the information above is set. If you use the EQUATION instruction, at minimum you are setting the explanatory variables, and can do any of the others as well.
Modification
There are quite a few ways to change the information associated with an EQUATION. First, instructions which estimate single equation linear models or are based upon a linear expression (for instance, a probit model with a linear "index" function) have an EQUATION option. This estimates the input EQUATION and resets any information such as the coefficients and residuals that are appropriate. The ASSOCIATE instruction can change information like the coefficients, though that's an older instruction, and in most cases, it's more straightforward to use the "set" functions %EQNSETCOEFS(eqn,c), %EQNSETIDENTITY(eqn,tag), %EQNSETRESIDS(eqn,series) and %EQNSETVARIANCE(eqn,variance). See Equation and Regression List functions for a more complete list of those.
You can change the basic structure of the model with MODIFY and VREPLACE, which allow you to substitute one variable with a transformation of another, such as replacing a variable with its difference, producing an equivalent equation.
Copyright © 2025 Thomas A. Doan