Skip to Main Content

How Docs

UW-specific

Use SPSS on FRONTIER

NOTE: Functional knowledge and use of this application is the responsibility of the user.

SPSS is a comprehensive tool for managing, analyzing and displaying information. Among the features available with SPSS are:

  • Ability to read and analyze complex file and record structures such as indexed, nested, or hierarchical files.
  • Extensive file management capabilities including the ability to split files, save files, and to match and merge multiple files.
  • Extended data management capabilities including the ability to define and manipulate long string variables, do conditional data transformations, and perform a wide variety of numeric functions.
  • Wide range of statistical analysis routines.
  • Latitude in data display, incorporating Report as a standard feature.

SPSS 6.1 for UNIX can operate in one of three modes.

  1. X-Windows (Motif) display: Simply entering the command spss at the shell prompt will start SPSS in a mode where it will assume you have an X-Window server on your desktop. Operation in this mode is described in the SPSS User’s Guide, Part 1, UNIX version.
  2. Manager mode: SPSS assumes you are working via a recognized terminal or terminal emulator, and will manage the display roughly like a windowed display. To invoke this mode, enter the command spss +m at the shell prompt. See the SPSS User’s Guide, Part 1, UNIX version, Appendix F, for a description of this mode.
  3. Batch mode/Prompted Mode: SPSS makes no assumptions at all about your display and operates in a simple command mode. Enter spss -m at the shell prompt. see the SPSS User’s Guide, Part 1, UNIX version, Appendices C and G.

    Note: Batch Mode/Prompted Mode is assumed for the rest of this How To.

The following two examples illustrate an easy way to use SPSS. Use an editor to create an SPSS command file. It is desirable to include the extension .sps on an SPSS command file name. The words TEST, TEST2, and MYDATA were arbitrarily selected.

Example 1: Create the file test.sps containing the following SPSS commands:

TITLE A Sample Program

DATA LIST / SEX 1 CLOTHES 3-5 RENT 7-9

VALUE LABEL SEX 1 ‘Male’ 2 ‘Female’

BEGIN DATA

2 65 100

1 86 70

1 50 50

2 100 100

2 70 60

END DATA

CROSSTABS SEX BY RENT

FINISH (Continued)

 

To run the program and generate output to the screen, enter the following command at the shell prompt:

frontier:~> spss -m test.sps.

To generate SPSS output in a file called test.lis, enter,

frontier:~> spss -m test.sps > test.lis.

Results from the SPSS job are viewed on the monitor by either editing the file or typing more test.lis
test.lis
can also be printed using a variety of commands:

frontier:~> lp test.lis. (Printout goes to a printer in the student computer lab in the lobby of the Information Technology Center)

Example 2: Use a Data File

The data file name can include the disk, the directory, and the file name. Here are three examples:

NAME='test.dat' (Current directory)

NAME='/tmp/test.dat' (To use a temp file)

NAME=’~doe/test.dat' (Doe's directory)

Use the editor to create test2.sps with these SPSS commands:

TITLE A Sample Using a Data File

DATA LIST FILE='test2.dat' FREE / SEX CLOTHES RENT

VALUE LABELS SEX 1 'MALES' 2 'FEMALES'

SORT CASES BY SEX

REPORT FORMAT = LIST/

VARIABLES = CLOTHES 'CLOTHING COST' (15)

RENT 'RENTAL COST' (15)/

BREAK = SEX(LABELS)/

SUMMARY = MEAN

FINISH

Use the editor to create a data file, test2.dat, with the following data:

2 65 100

1 86 70

1 50 50

2 100 100

2 70 60

The SPSS command file will use data from the file test2.dat when the following command file is executed.

frontier:~> spss -m test2.sps.


 

Reviewed: 0709 By: GG

Additional help with the installation and configuration of
UW-supported software is available:
Faculty/Staff
Contact the IT Help Desk at 766-HELP (4357), option 1
Email UserHelp@uwyo.edu
Contact your IT user consultant
(www.uwyo.edu/infotech/services/helpdesk/uc/)

Students
Email ASU-IT@uwyo.edu
Contact the IT Help Desk at 766-HELP (4357), option 1
Come to the student computer lab in the lobby of the
Information Technology Center.

Footer Navigation

University of Wyoming
 
1000 E. University Ave. Laramie, WY 82071 // UW Operators (307) 766-1121 // Contact Us