Gary King Homepage Previous: Purpose: Up: EIREAD Next: Globals:

Example:

This example assumes that you have first run ei and saved a data buffer (called racevote.fmt in the example below). eiread can be run interactively or via a batch file. Here is a typical set of commands that you might run, although many other options to replace the items in quotes are available below.
new;
library ei;                     @ initialize ei @
loadm dbuf = racevote;          @ load in data buffer @
format/rd 7,4;                  @ nicely format output; 4 decimal places @
eiread(dbuf,"sum");             @ summary info @
betaw = eiread(dbuf,"betaw");   @ extract point estimates for betaW @
betabCI = eiread(dbuf,"ci80b"); @ extract betaB confidence intervals @
call eiread(dbuf,"goodman");    @ run Goodman's regression @
The last example illustrates the Gauss ``call'' statement, which discards the output of eiread, leaving only the results that are explicitly printed to the screen by some eiread options. To save output from these procedures in an ascii text file, include commands like these:
output file=filename.txt reset;  @ start saving to filename.txt @
  betaw;                         @ print previously saved output @
  eiread(dbuf,"betab");          @ print betaB results @
output off;                      @ close output file @



Gary King 2006-09-13