Auto-Updating Series

One of the most powerful features of EViews is the ability to use a series expression in place of an existing series. These expressions generate auto-series in which the expression is calculated when in use, and automatically recalculated whenever the underlying data change, so that the values are never out of date.

Auto-series are designed to be discarded after use. The resulting downside to auto-series is that they are quite transitory. You must, for example, enter the expression wherever it is used; for example, you must type “LOG(X)” every time you wish to use an auto-series for the logarithm of X. For a single use of a simple expression, this requirement may not be onerous, but for more complicated expressions used in multiple settings, repeatedly entering the expression quickly becomes tedious.

For more permanent series expression handling, EViews provides you with the ability to define a series or alpha object that uses a formula. The resulting auto-updating series is simply an EViews numeric series or alpha series that is defined, not by the values currently in the object, but rather by an expression that is used to compute the values. In most respects, an auto-updating series may simply be thought of as a named auto-series. Indeed, naming an auto-series is one way to create an auto-updating series.

The formula used to define an auto-series may contain any of the standard EViews series expressions, and may refer to series data in the current workfile page, or in EViews databases on disk. It is worth emphasizing that in contrast with link objects, which also provide dynamic updating capabilities, auto-updating series are designed to work with data in a single workfile page.

Auto-updating series appear in the workfile with a modified version of the series or alpha series icon, with the numeric series icon augmented by an “=” sign to show that it depends upon a formula.

Defining an Auto-Updating Series

Using the Dialog

To turn a ordinary series into an auto-updating series, you will assign an expression to the series and tell EViews to use this expression to determine the series values. Simply click on the Properties button on the series or alpha series object toolbar, or select View/Properties... from the main menu, then select the Values tab.

There are three radio buttons which control the values that will be placed in the numeric or alpha series (“Alpha Series”). The default setting is either Numeric data or Alphanumeric (text) data (depending on the series type) in which the series is defined by the values currently in the series; this is the traditional way that one thinks of defining a numeric or alpha series.

If instead you select Formula, enter a valid series expression in the dialog box, and click on OK, EViews will treat the series as an auto-updating series and will evaluate the expression, putting the resulting values in the series. Auto-updating numeric series appear with a new icon in the workfile—a slightly modified version of the standard series icon, featuring the series line with an extra equal sign, all on an orange background.

Lastly, External link indicates that the series is linked to data found outside of EViews as described in the link specification. You will be prompted to update data in external links whenever the workfile is opened, and you may update the external series links on demand by right-clicking on the series, and selecting Update... or clicking on CTRL-F5.

In this example, we instruct EViews that the existing series LOGTAXRT should be an auto-updating series that contains the natural logarithm of the TAXRATE2 series. As with an auto-series expression, the values in LOGTAXRT will never be out of date since they will change to reflect changes in TAXRATE2. In contrast to an auto-series, however, LOGTAXRT is a permanent series in the workfile which may be used like any other series.

Alternately, you may create an auto-updating series that links to a series in a external file or database by selecting External link. In contrast to an auto-updating series based on a formula which updates whenever the underlying data change, an auto-updating series based on an external link will update only when the workfile is first loaded (you will be prompted for whether to refresh the data series or not) or when you manually update the links by clicking on Object/Manage Links & Formulae... in the workfile window, then either selecting the source database above or selecting the individual objects that are linked to that database and then clicking the associated Refresh button. You may also update the link by selecting Update... in the series Object menu.

You may, at any time, change an auto-updating series into an standard numeric series by bringing up the Values page of the Properties dialog, and clicking on the Numeric data setting. EViews will define then define the series by its current values. In this way you may freeze the formula series values at their existing values, a procedure that is equivalent to performing a standard series assignment using the provided expression.

Note that once an expression is entered as a formula in a series, EViews will keep the definition even if you specify the series by value. Thus, you make take a series that has previously been frozen, and return it to auto-updating by selecting Formula definition.

Issuing a Command

To create an auto-updating series using commands, you should use the formula keyword, frml, followed by an assignment statement. The following example creates a series named LOW that uses a formula to compute values. 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 takes the value 0 otherwise:

frml low = inc<=5000 or edu<13

LOW is now an auto-updating series that will be reevaluated whenever INC or EDU change.

You may also define auto-updating alpha series using the frml keyword. If FIRST_NAME and LAST_NAME are alpha series, then the declaration:

frml full_name = first_name + " " + last_name

creates an auto-updating alpha series, FULL_NAME.

The same syntax should be used when you wish to apply a formula to an existing series.

series z = rnd

frml z =(x+y)/2

makes Z an auto-updating series that contains the average of series X and Y. Note that the previous values of Z are replaced, and obviously lost. Similarly, we may first define an alpha series and then apply an updating formula:

alpha a = "initial value"

frml a = @upper(first_name)

You may not, however, apply an alpha series expression to a numeric series, or vice versa. Given the series Z and A defined above, the following two statements:

frml z = @upper(first_name)

frml a = (x+y)/2

will generate errors.

Note that once a numeric series or alpha series is defined to be auto-updating, its values may not be modified directly, since they are determined from the formula. Thus, if Z is an auto-updating series, the assignment command:

z = log(x)

will generate an error since an auto-updating series may not be modified. To modify Z you must either issue a new frml assignment or you must first set the values of Z to their current values by turning off auto-updating, and then issue the assignment statement.

To reset the formula in Z, you may simply issue the command:

frml z = log(x)

to replace the formula currently in the series.

To turn off auto-updating for a series, you may use the special expression “@CLEAR” in your frml assignment. When you turn off auto-updating, EViews freezes the numbers or strings in the series at their current values. Once the series is set to current values, it is treated as an ordinary series, and may be modified as desired. Thus, the commands:

frml z = @clear

z = log(x)

are allowed since Z is converted into an ordinary series prior to performing the series assignment.

Alternately, you may convert a named auto-updating series into an ordinary series by selecting Object/Manage Links & Formulae... from the workfile window and using the dialog to break the links in the auto-updating series.

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 in the workfile called GDP that gets its values from the series GDP in the database USDATA. Similarly:

frml lgdp = log(usdata::gdp)

creates an auto-updating series named LGDP that contains the log of the values of GDP in the database USDATA.

Series that reference data in databases may be refreshed each time a workfile is loaded from disk. Thus, it is possible to setup a workfile so that its data are current relative to a shared database.

Naming an Auto-Series

If you have previously opened a window containing an ordinary auto-series, you may convert the auto-series into an auto-updating series by assigning a name. To turn an auto-series into an auto-updating series, simply click on the Name button on the toolbar, or select Object/Name... from the main menu, and enter a name. EViews will assign the name to the series object, and will apply the auto-series definition as the formula to use for auto-updating.

Suppose, for example, that you have opened a series window containing an auto-series for the logarithm of the series CP by clicking on the Show button on the toolbar, or selecting Quick/Show… and entering “LOG(CP)”. Then, simply click on the Name button in the auto-series toolbar, and assign a name to the temporary object to create an auto-updating series in the workfile.

Additional Issues

Auto-updating series are designed to calculate their values when in use, and automatically update values whenever the underlying data change. An auto-updating series will assign a value to every observation in the current workfile, irrespective of the current values of the workfile sample.

In most cases, there is no ambiguity in this operation. For example, if we have an auto-updating series containing the expression “LOG(CP)”, we simply take each observation on CP in the workfile, evaluate the log of the value, and use this as the corresponding auto-updating series value.

However, in cases where the auto-updating series contains an expression involving descriptive statistics, there is ambiguity as to whether the sample used to calculate the values is the sample at the time the auto-updating series was created, the sample at the time the series is evaluated, the entire workfile range, or some other sample.

To resolve this ambiguity, EViews will enter the current workfile sample into the expression at the time the auto-updating series is defined. Thus, if you enter “@MEAN(CP)” as your auto-updating series expression, EViews will substitute an expression of the form “@MEAN(CP, smpl)” into the definition. If you wish to evaluate the descriptive statistics for a given sample, you should enter an explicit sample in your expression.