Eviews Functions


All of the operators described below may be used in expressions involving series and scalar values. When applied to a series expression, the operation is performed for each observation in the current sample.

Table 1.1: Operators


Basic Mathematical Functions

The following functions perform basic mathematical operations. When applied to a series, they return a value for every observation in the current sample. When applied to a matrix object, they return a value for every element of the matrix object.

Table 1.2: Mathematical Functions

Mathematical Functions

Time Series Functions The following functions facilitate working with time series data.

Statistical functions

These functions compute descriptive statistics for a specified sample, excluding missing values if necessary. The default sample is the current workfile sample. If you are performing these computations on a series and placing the results into a series,

Table 1.3: Time Series Functions

Time Series Functions

you can specify a sample as the last argument of the descriptive statistic function, either as a string (in double quotes) or using the name of a sample object.

Statistical Functions

Statistical Functions

Statistical Distribution Functions

The following set of functions gives you a possibility to compute and use within your analysis values of density functions, cumulative distribution, quantile functions, and random number generators for a variety of statistical distributions.

Table 1.4: Statistical Distribution Functions

Statistical Distribution Functions

This tables provides cumulative, density, quantile functions and the random number generator functions respectively for the following distributions

Programming in Eviews

On addition to the interactive part of the EViews, where you use the menu commands, windows and graphical interface, you can use programming language to perform your analysis. There are two ways of using the EViews batch language - either enter and edit commands in the command window, or create programs. A program is simply a text file containing EViews commands. Each command in the program will be executed in the order that it appears in the program. Using programs allows you to use looping, conditioning and subroutine processing.

In order to create a program file in EViews, select File/New/Program from the main menu. EViews will open an untitled program window where you can enter your commands. You can save the program by clicking on the Save or Save As button. EViews will add the extension ".PRG" to the name you provide.

To load a program previously saved on disk, click on File/Open/Program, navigate to the appropriate directory, and click on the desired name. Alternatively, from the command line, you may type open followed by the full program name, including the file extension ".prg". If necessary, include the full path to the file. The entire name should be enclosed in quotations if necessary.

A program consists of a one or more lines of text. Since each line of a program corresponds to a single EViews command, simply enter the text for each command and terminate the line by pressing the Enter key.

There are several ways to execute a program. The easiest method is to execute your program by pushing the Run button on a program window. The Run dialog opens, where you can enter the program name and supply arguments. You may use the radio buttons to choose between Verbose and Quiet modes. In verbose mode, EViews sends messages to the status line and continuously updates the workfile window as objects are created and deleted. Quiet mode suppresses these updates, reducing the time spent writing to the screen.

By default, when EViews encounters an error, it will immediately terminate the program and display a message. If you enter a number into the Maximum errors before halting field, EViews will continue to execute the program until the maximum number of errors is reached (unless there is a serious error occurred).

You may also execute a program by entering the run command, followed by the name of the program file:

Simple Programs

The simplest program is just a list of commands. Execution of the program is equivalent to typing the commands one by one into the command window. Entering commands in the program file has the advantage that you can save the set of commands for later use, and execute the program repeatedly, making minor modifications each time. Let us look at a simple example. Create a new program by typing program MYPROG in the command window. In the program window that opens for MYPROG, we are going to enter the commands to create a workfile, run a regression, compute residuals and a forecast, make a plot of the forecast, and save the results.

Figure 1.4: Program Window

Program Window

< Prev   CONTENTS   Next >