A Quick Guide to SHAZAM
by Walter Sosa
1. Very basic SHAZAM (getting help and quitting)
To start SHAZAM for Windows double click in the corresponding icon (ask the local system administrator if you have questions about where Shazam is installed). Once the program is loaded you will see the Shazam prompt (:).
To obtain help, just type :
HELP command
where command is any valid Shazam command. For example, help ols shows available help on the ols command use to perform ordinary least squares. Type help alone to see a list of available commands. To exit SHAZAM, simply type:
QUIT
2. Reading data
We assume your data is in an ASCII (text) file called mydata.txt. The first four lines of mydata.txt should look like this:
YEAR CONSUME INCOME PRICE
1923 99.2 96.7 101.0
1924 99.0 98.4 100.1
1925 100.0 100.0 100.0
1926 111.6 104.9 90.6
First we need to set the sample size. In our example we will have 17 observations, so we do:
SAMPLE 1 17
where 1 and 17 refer to the first and last observation respectively. Now we are ready to read the data from the mydata.txt file. This is done with:
READ(mydata.txt) year consume income price /skiplines=1
This command assumes that mydata.txt is located in the same subdirectory as the Shazam program, if not you should provide a full path to the file. The command follows with a list of the names of the variables being read. The option /skiplines=1 indicates that the file contains variables names in the first row. You should ignore this option if this is not the case or change the number in skiplines if variable names are contained in more than one row. If you want to list the data, you can do it with:
PRINT year consume income price
this will show a list with the variables above.
3. Basic statistics and regressions
Basic descriptive statistics can be produced with the following line:
STAT consume income price
This shows a table with some descriptive statistics for each of the variables. To run an ordinary least squares regression, the command is:
OLS consume income price
This will produce ols estimates of a regression of consume on income and price. The first variable in the list is always taken to be the dependent variable and the rest are treated as explanatory variables. By default, a constant is always included in the model.
4. Producing output files and reading commands from external files.
It will be useful to store results in a text file that could be later printed or edited with a wordprocessor. At the Shazam prompt type:
FILE SCREEN filename
and Shazam will send output to the file filename and the screen simultaneously. This command must be typed before any other command whose output you want to send to filename. Sometimes it is useful to collect a sequence of Shazam commands in a text file and run them all at once. To do this you have to create a text file containing valid Shazam commands, as if you were typing them in Shazam, one at each line. After you have saved the file (in a file named command.txt, say), at the Shazam prompt type:
FILE INPUT command.txt
and the program will execut the commands contained in the command.txt file.
As an example, we reproduce a full session
FILE SCREEN shout.out
SAMPLE 1 17
READ(shazdat.txt) year consume income price /skiplines=1
PRINT year consume income price
STAT consume income price
OLS consume income price
Note that any output will be sent to the file shout.out and the screen simultaneously.
5. Where to find more information