Command Reference : Command Reference
  
 
frml
Declare a series object with a formula for auto-updating, or specify a formula for an existing series.
Syntax
frml series_name = series_expression
frml series_name = @clear
Follow the frml keyword with a name for the object, and an assignment statement. The special keyword “@CLEAR” is used to return the auto-updating series to an ordinary numeric or alpha series.
Examples
To define an auto-updating numeric or alpha series, you must use the frml keyword prior to entering an assignment statement. The following example creates a series named LOW that uses a formula to compute its values.:
frml low = inc<=5000 or edu<13
The auto-updating series takes the value 1 if either INC is less than or equal to 5000 or EDU is less than 13, and 0 otherwise, and will be re-evaluated whenever INC or EDU change.
If FIRST_NAME and LAST_NAME are alpha series, then the formula declaration:
frml full_name = first_name + " " + last_name
creates an auto-updating alpha series FULL_NAME.
You may apply a frml to an existing series. The commands:
series z = 3
frml z =(x+y)/2
makes the previously created series Z an auto-updating series containing the average of series X and Y. Note that once a series is defined to be auto-updating, it may not be modified directly. Here, you may not edit Z, nor may you generate values into the series.
Note that the commands:
series z = 3
z = (x+y)/2
while similar, produce quite different results, since the absence of the frml keyword in the second example means that EViews will generate fixed values in the series instead of defining a formula to compute the series values. In this latter case, the values in the series Z are fixed, and may be modified.
One particularly useful feature of auto-updating series is the ability to reference series in databases. The command:
frml gdp = usdata::gdp
creates a series called GDP that obtains its values from the series GDP in the database USDATA. Similarly:
frml lgdp = log(usdata::gdp)
creates an auto-updating series that is the log of the values of GDP in the database USDATA.
To turn off auto-updating for a series or alpha, you should use the special expression “@CLEAR” in your frml assignment. The command:
frml z = @clear
sets the series to numeric or alpha value format, freezing the contents of the series at the current values.
Cross-references
See “Auto-Updating Series” for a discussion of updating series.
See also Link::link.