SPSS, release 6.1, is a set of computer programs providing many different statistical procedures within a unified framework. It allows you to run complex analyses without getting bogged down in the details of computations, and you can use the procedures without knowing another programming language. SPSS does a good job of data management and labeling and has many advanced statistical procedures.
The SPSS package is available on all RS/6000s supported by Information Technology and Communcation (ITC) and contains the BASE system, ADVANCED STATISTICS, and TABLES modules. To use SPSS on the RS/6000, you need to know how to log on and how to use the Unix operating system. Most SPSS users will find it useful to know how to use a text editor such as JOVE, Vi or PICO.
Before you use SPSS on the RS/6000, you may want to refer to the local documents U-001, Unix Resource List and U-002, Intoduction to the Unix Operating System. Local documentation listed may be obtained from the ITC Help Desk or from Professor Publishing, University of Virginia Bookstore. Short Course notes for SPSS are also available at Professor Publishing. X Windows users may want to refer to document U-014, Introduction to the X Window System.
The following manuals are available, for reference only, from the ITC library; call the ITC Help Desk at 924-3731 for directions. Personal copies may be ordered from the University of Virginia Bookstore.
Help for SPSS and information on the version available on the RS/6000 may be obtained within the program by executing the HELP and INFO commands. Typing man spss at the Unix prompt gives an on-line version of the RS/6000 help entry for SPSS.
Consultants at the ITC Help Desk (924-3731) are familiar with using the RS/6000 computers. They can help you with SPSS syntax problems. They cannot interpret statistical results and may have difficulties with using complex statistical procedures. A statistical computing consultant is available part-time for help with selection of statistical procedures, construction of your job, and interpretation of your statistical results. To contact a statistical computing consultant, send electronic mail to stat-consult@virginia.edu or telephone 924-3731 and request a statistical consultant. Additional information and support can be obtained from the comp.soft-sys.stat.spss newsgroup.
SPSS is available on all ITC supported RS/6000s. If you are logging
on to your RS/6000 account via telnet from an ITC PC lab, select the
http://www.itc/virginia.edu/desktop/unix/docs/u002.unix.intro.html
or
http://www.itc/virginia.edu/desktop/unix/docs/u001a.umenu.html
You do not need to modify your PATH variable in order to run spss. However, if you are running SPSS in an interactive mode the TERM variable in your .profile file must be set to one of the terminal types supported by SPSS, e.g., vt100, xterm or ansi. The default terminal type is vt100. If you are using or emulating some other type of terminal, include in your .profile file the line:
TERM=terminal-type
where terminal-type is xterm, ansi, or some other supported terminal.
Additionally, the SPSS Manager (when in the SPSS interactive Manager mode) may refer to the keyboard function keys. If the F1, F2, ..., F9, F10 keys on your terminal do not work, use the corresponding escape sequences ESC-1, ESC-2, ..., ESC-9, ESC-0.
For information on using SPSS from within the X Window System, please see ITC's documents U-014, Introduction to the X Window System and U-014A, More about X Windows. These documents are available from the ITC Help Desk and on-line in ITCWeb at:
http://www.itc.virginia.edu/desktop/unix/docs/u014.xwindows.html
or
http://www.itc.virginia.edu/desktop/unix/docs/u014a.xwindows.html
SPSS can be used in several ways on the RS/6000. You may run SPSS in the non-interactive mode (the recommended mode) or interactively in one of two modes: using the SPSS Manager (a screen-oriented editor, browser, and command builder), or in a simpler prompted mode.
Non-interactive mode allows you to collect all of your data manipulations and procedures into a file that is then processed by SPSS. Noninteractive jobs may be run in the foreground or background.
The interactive modes (SPSS Manager mode or prompted mode) allow you to execute your procedures as you type them. The Definition of SPSS Environment Variables portion of this document contains information on the enviroment definitions necessary to run SPSS in the interactive mode.
The non-interactive mode the recommended mode for using SPSS. Non-interactive mode can be used to process files of SPSS commands that have been created with one of the text editors (JOVE or Vi). Command lines cannot exceed 80 columns. If a command is too long to fit in 80 columns, a continuation line can begin at an indention of one space from the left margin. The suffix .sps, while not required, is recommended for the command file. To run the SPSS job, the -m option along with input and output redirection operators can be used. For example:
spss -m < infile.sps > outfile.lst <CR>
processes all the commands in the file infile.sps, and places the results in the file outfile.lst.
To run SPSS as a detached process, create an SPSS command file as above and then execute it as a background process (designated by the ampersand symbol) with the command:
spss -m < infile.sps > outfile.lst& <CR>
Other Unix commands that can also be used with background processes include nohup and at. To run an SPSS session in non-interactive mode and have it continue to execute after you log off, insert the command nohup meaning "no hangups" at the beginning of the command line, as in:
nohup spss -m < infile.sps > outfile.lst& <CR>
To schedule an SPSS non-interactive program to execute at one minute before midnight, enter
echo 'spss -m < infile.sps > outfile.lst' | at 23:59 <CR>
For further information about the at, echo, and nohup commands, consult the man pages.
To invoke an interactive SPSS Manager session under Unix, type (if you are using spss in a X windows environment you may wish to use the X Windows SPSS Manager Mode):
spss +m <CR>
An SPSS Manager screen, similar to the one below, will appear containing an Input and Output window. If you are familiar with SPSS/PC+, you will notice that the SPSS Manager mode is very similar to it.
_____________________________________________________________________
| |
| HIGHRES = NO |
| |
| LENGTH = NONE (no page ejects) |
| |
| |
| |
| |
| |
| |
| |
| ------------------------------------------------------------------ |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| -------------------------------------------Ins------<ready>------- |
| Input Window |
| |
|____________________________________________________________________|
The lower window is for input where you enter and run commands. You may scroll up and down in the window, open, edit, and save command files. The upper window (hidden by the Main Menu) is where you will see the results of executed SPSS statements; i.e., your output. You can scroll in the output window, edit, and save listing files. To alternate between the input and output windows, press ESC-S.
The SPSS Manager has a menu system (accessed by typing ESC-M) which allows you to "cut and paste" commands to open files, run analyses, and save output. Alternately, commands may be typed directly into SPSS in edit mode (accessed by typing ESC-E). The menu system also has context sensitive help and a glossary to assist in writing commands and interpreting the output.
If you specify a file name on the SPSS command line, the SPSS statements from that file will appear in the Input window. Place the cursor on the first line of the file by typing ESC-< and run the program interactively with ESC-0, selecting the "run from Cursor" option from the menu.
To exit the interactive SPSS session, enter ESC-0 and select the "exit" option from the menu.
Following is a list of some important keystrokes used in the SPSS Manager:
| ESC-1 | Information mini-menu, requests Manager help |
| ESC-2 | Windows mini-menu, handles window toggling, sizing |
| ESC-3 | Input Files mini-menu, edits files |
| ESC-4 | Lines mini-menu, inserts & deletes lines |
| ESC-5 | Find & Replace mini-menu, finds and replaces text |
| ESC-6 | Go To mini-menu, moves cursor to specified area |
| ESC-7 | Define Area mini-menu, marks lines, commands, rectangles |
| ESC-8 | Area Actions mini-menu, copies, moves, deletes text |
| ESC-9 | Output File mini-menu, writes to a file |
| ESC-0 | Run mini-menu, runs commands, also EXITS from SPSS |
| ESC-E | Initiates edit mode, which allows direct typing of commands |
| ESC-F | Displays Files window, a list of files in a specified directory |
| ESC-G | Glossary window, defines terms |
| ESC-J | Jumps to the main menu |
| ESC-M | Initiates menu mode, which allows cut & paste of commands |
| ESC-R | Displays Help window |
| ESC-S | Toggles between Input & Output windows |
| ESC-V | Displays Variables window, a list of variables available to the session |
| ESC-X | On-line syntax chart |
| ESC-Z | Expands the active window to full-screen size |
| ESC-ESC | Moves up one level in the menu |
| ESC-< | Moves the cursor to the beginning of the file |
| ESC-> | Moves the cursor to the end of the file |
For a more complete explanation and tutorial, see the manual, SPSS for UNIX: Operations Guide. Users familiar with SPSS/PC+ will find the interactive mode on Unix machines to be very similar to that of the microcomputer product.
SPSS now has a fully functional windowed environment for Unix that is very similar to the Windows 95/Macintosh windowed/menu system. You must use an X-Windows capable terminal connection (e.g., eXceed or MacX).
To invoke the X Windows version of the SPSS Manager Mode type:
spss<CR>
To get high-resolution graphs, you must turn them on. The SPSS command is SET HIGHRES=ON. The default setting at UVA is HIGHRES=NO. High Resolution charts and graphs can only be viewed and printed from within the X-Windows (Motif) interface for SPSS.
To invoke an interactive SPSS prompted session under Unix, type
spss -m<CR>
During a prompted session, your commands are processed as you issue them, and SPSS output and messages appear on your screen as you work.
When you receive the prompt
SPSS>,
type the name(s) of the SPSS procedure(s) you want to use. If a procedure statement requires more than one line, press the RETURN key before you get to column 80. You will get a
CONTINUE>
prompt. Continue typing the procedure statements. The last line of procedure statements must end with a period. The period tells SPSS to process these commands. SPSS will display the results of each procedure on your terminal screen.
Common typing mistakes will generate SPSS error messages. If you
forget to end an SPSS statement with a period, you may recover from this
mistake by simply entering a period at the
CONTINUE> prompt, since SPSS
commands may be continued over several lines. If you make a syntax error, you will get a message
stating what SPSS thought the error was and
suggesting possible solutions. SPSS will also tell you if the command
was NOT executed. You can correct these
mistakes by re-typing the commands correctly at
the next SPSS> prompt.
When you have completed your work, type the SPSS command:
finish. <CR>
By default, SPSS creates a journal of the commands you use during an interactive session. The default name of the journal is spss.jnl, and it is created in the current directory. Each time SPSS is run interactively it erases the previous copy of the file spss.jnl. WARNING: By default, SPSS does NOT create a listing file of you output and only displays it on your screen.
The following options may also be used when invoking an interactive SPSS prompted session:
| -p | displays output on the terminal one page at a time. |
| -t filename | sends output to the terminal and a disk file (filename) simultaneously - you must specify this opiton at invocation to have a listing file saved. |
From within a prompted SPSS session, several helpful commands are:
| ? command | command will give help for command. Press the RETURN key to end help. |
| CTRL-C | interrupts an SPSS command and will return you to the SPSS>fP prompt. |
| HELP | provides asstance with using SPSS commands and syntax. |
| ? | also provides asstance with using SPSS commands and syntax. |
Typing man spss at the Unix prompt gives help with invoking and running SPSS. The document you are reading (U024.spss) is also available on line at:
http://www.itc.virginia.edu/research/u024.spss.html
The SPSS info procedure gives you access to more information about using SPSS on the RS/6000. The following topics may be used as subcommands with the info command:
| local | documentation about the way SPSS runs on the RS/6000 |
| overview | topics available for use with the info command |
| errors | information about known SPSS errors |
| facilities | information on SPSS facilities |
| procedures | information on select SPSS procedures |
| all | all of the above |
To get information about known errors using SPSS on the RS/6000, execute the info command within SPSS. In SPSS non-interactive mode or in interactive SPSS Manager mode, add the following line to your SPSS input file or window:
info errors. <CR>
To get the same information in interactive prompted mode, enter the above command at the SPSS prompt.
The SPSS help procedure provides user assistance within the SPSS program in interactive SPSS prompted mode only. During an interactive SPSS prompted session, type
help. <CR> or ? <CR>
and you will be provided with a hierarchy of information screens.
Example SPSS programs used in the SPSS short course as well as other example files are located in the directory /help/unix/statistics/spss/examples on the RS/6000. These files can be copied to your account by typing
cp /help/unix/statistics/spss/examples/* .<CR>
To run a non-interactive SPSS session using the first example, type
spss -m < example1.sps > example1.lst<CR>
To run the first example program in interactive mode, enter
spss +m example1.sps<CR>
The example1.sps file will automatically be loaded into the input window.
Place the cursor on the first line of the program with
the ESC-< command.
Type ESC-0 and select the "run from Cursor" option. Examine the
results displayed in the output window.
To exit, enter ESC-0 and select
the exit option from the menu.
To run the first example in prompted interactive mode, enter the following commands:
spss -m<CR>
include 'example1.sps'.<CR>
finish.<CR>
You may want to get a copy of the SPSS short course notes from Professor Publishing, University of Virginia Bookstore and use these example files in conjuction with those notes.
The manual, SPSS for UNIX: Operations Guide, contains a tutorial session that refers to SPSS files available on the RS/6000 in the /spss/tutorial directory. To copy these files to your account before starting the tutorial, enter
cp /spss/tutorial/* . <CR>
There is a README file in the /help/unix/statistics/spss directory that provides additional information on using SPSS. You can also contact the ITC Help Desk at 924-3731 adn ask to speak to the statistical consultant or send electronic mail to stat-consult@virginia.edu
WE REALLY WANT TO KNOW...
Have you found this publication useful? Are there ways we
might improve or supplement it or other ITC publications?
Did you find this document in Web or in hard copy?
We really want your opinion. Send e-mail to: newsdesk@virginia.edu