Using Sabre: Input and output

Sabre manual

Data and commands can be read into SABRE either directly from the terminal or from an external file.

If the user wishes to keep a record of the current SABRE session, then type

OUTPUT filename

where filename is the optional name of the log file in which the record is to be written. If no file name is specified then the file sabre.log will contain a copy of all screen output.

For additional output on the optimisation process, also type

TRACE filename

where filename is the optional name of the trace file in which the output is to be written. If no file name is specified then the file sabre.trace will be created.

We use a DATA statement to tell SABRE the names of variables for which it is about to receive data. This is done by typing

DATA variable list

Only the first 12 characters of variable names are stored by SABRE. Names can contain any combination of characters, provided that the first character is not an integer, a dollar sign or an ampersand. Note that, whenever a DATA command is issued, SABRE assumes that a new analysis is to begin. All previous structures in the worksheet will be lost and all model constants reset to their default values.

We next issue the READ command with the name of the file containing the data as an argument. (If no filename is given SABRE assumes that data is to be entered directly from the terminal). Thus we type

READ filename

Data are read observation by observation. Data for each new observation begins on a new line but may extend over several lines. In the case of an error, an appropriate message will be displayed, giving the error code to be looked up in a FORTRAN manual. If the error is due to insufficient storage space, the user should consult the section concerned with space restrictions . When reading data from the terminal, any command (or comment C) will terminate the data input.

Commands may also be issued by storing them in a file and then running them from within SABRE by typing

INPUT filename

A simple example using an input file might be

DATA a b c
READ filename


Although in this example data are stored in a separate file, data may also be stored in the input file. However, doing this will slightly reduce the speed by which data is read.

When data have been read by SABRE, a message is displayed giving the total number of observations (ie, rows) in the dataset. Note that SABRE cannot deal with missing values and that each observation must include measurements on every variable.

To check on the variables in the worksheet type


where VARIABLES, along with all the other options for the DISPLAY command, may be shortened to its first letter - in this case V.

DISPLAY VARIABLES also shows the number of levels in a variable (see FACTOR and TRANSFORM commands in the next section) and whether it is a response (YVAR), risk (RVAR), case (CASE), offset (OFFSET) or explanatory (X) variable (these types of variables are explained in a later section).

Go to: Sabre home page | Sabre manual | Downloading & Installing Sabre | Sabre examples | Training materials | Sabre mailing list | Contact us

Other links: Centre for e-Science | Centre for Applied Statistics