Spss Win Printable
Spss Win Printable
What is SPSS?
SPSS is a comprehensive and flexible statistical analysis and data management system. SPSS can take data from almost any type of file and use them to generate tabulated reports, charts, and plots of distributions and trends, descriptive statistics, and conduct complex statistical analyses. SPSS is available from several platforms; Windows, Macintosh, and the UNIX systems. SPSS for Windows, brings the full power of the mainframe version of SPSS to the personal computer environment. It will enable you to perform many analyses on your PC that were once possible only on much larger machines. SPSS for Windows provides a user interface that makes statistical analysis more intuitive for all levels of users. Simple menus and dialog box selections make it possible to perform complex analyses without typing a single line of command syntax. The built-in SPSS Data Editor offers a simple and efficient spreadsheet-like utility for entering data and browsing the working data file. High-resolution, presentation-quality charts and plots can be created and edited. Using the SPSS Viewer, you can handle the output with greater flexibility. SPSS for Windows also reads data files from a variety of file formats including Excel, SAS, and Stata.
Orientation
Windows in SPSS
There are a number of different types of windows that you will see in SPSS: Data Editor window This window displays the contents of the data file. You may create new data files, or modify existing ones with the Data Editor. The Data Editor window opens automatically when you start an SPSS session. Viewer window The Viewer window displays the statistical results, tables, and charts from the analysis you performed (e.g., descriptive statistics, correlations, plots, charts). A Viewer window opens automatically when you run a procedure that generates output. In the Viewer windows, you can edit, move, delete and copy your results. Pivot Table Editor window Output displayed in pivot tables can be modified in many ways with the Pivot Table Editor. You can edit text, swap data in rows and columns, add color, create multidimensional tables, and selectively hide and show results. Chart Editor window You can modify and save high-resolution charts and plots in chart windows. You can change the colors, select different type fonts or sizes, switch the horizontal and vertical axes, rotate 3-D scatter plots, and even change the chart type.
Text Output Editor window Text output not displayed in pivot tables can be modified with the Text Output Editor. You can edit the output and change font characteristics (type, style, color, size). Syntax Editor window You can paste your dialog box choices into a Syntax Editor window, where your selections appear in the form of command syntax. You can then edit the command syntax to utilize special features of SPSS not available through dialog boxes. If you are familiar with SPSS software under other operating systems (e.g., Unix), you can open up a Syntax Editor window and enter SPSS commands exactly as you did under those platforms and execute the job. You can save these commands in a file for use in subsequent SPSS sessions. Script Editor window Scripting and OLE automation allow you to customize and automate many tasks in SPSS. Use the Script Editor to create and modify basic scripts. If you have more than one open Viewer window, output is routed to the designated Viewer window. If you have more than one open Syntax Editor window, command syntax is pasted into the designated Syntax Editor window. (Paste feature will be explained later.) The designated in the status bar at the top of each SPSS window. You can change the designated window at windows are indicated by a green plus sign any time by selecting it (making it active) and clicking the highlighted pushbutton on the toolbar. An active window is the currently selected window which appears in the foreground. An active window may not be a designated window until you instruct SPSS to make it a designated window.
Most menus are common for all windows and some are found in certain types of windows. Common menus File Use the File menu to create a new SPSS system file, open an existing system file, read in spreadsheet or database files created by other software programs (you can read data into SPSS from any database format for which you have an ODBC [Open Database Connectivity] driver), read in an external ASCII data file from the Data Editor; create a command file, retrieve an already created SPSS command file into the Syntax Editor; open, save, and print output files from the Viewer and Pivot Table Editor; and save chart templates and export charts in external formats in the Chart Editor, etc. Edit Use the Edit menu to cut, copy, and paste data values from the Data Editor; modify or copy text from the Viewer or Syntax Editor; copy charts for pasting into other applications from the Chart Editor, etc. View Use the View menu to turn toolbars and the status bar on and off, and turn grid lines on and off from all window types; and control the display of value labels and data values in the Data Editor. Analyze This menu is selected for various statistical procedures such as crosstabulation, analysis of variance, correlation, linear regression, and factor analysis. Graphs Use the Graphs menu to create bar charts, pie charts, histograms, scatterplots, and other full-color, high-resolution graphs. Some statistical procedures also generate graphs. All graphs can be customized with the Chart Editor. Utilities Use the Utilities menu to display information about variables in the working data file and control the list of variables from all window types; change the designated Viewer and Syntax Editor, etc. Add-ons Use the Add-ons menu to view the information of add-on modules. Window Use the Window menu to switch between SPSS windows or to minimize all open SPSS windows. Help This menu opens a standard Microsoft Help window containing information on how to use the many features of SPSS. Context-
sensitive help is available through the dialog boxes. Data Editor specific menus Data Use the Data menu to make global changes to SPSS data files, such as transposing variables and cases, or creating subsets of cases for analysis, and merging files. These changes are only temporary and do not affect the permanent file unless you save the file with the changes. Transform Use the Transform menu to make changes to selected variables in the data file and to compute new variables based on the values of existing ones. These changes are temporary and do not affect the permanent file unless you save the file with changes. Viewer specific menus Insert Use the Insert menu to change the page breaks. Format Use the Format menu to change font characteristics, underline, and bold. Pivot Table Editor specific menus Insert Use the Insert menu to insert titles, captions, and footnotes; and to create table breaks. Pivot Use the Pivot menu to perform basic pivoting tasks, to turn pivoting trays on and off, and to go to specific layers in a multidimensional pivot table. Format Use the Format menu to modify table and cell properties; to apply and change TableLook formats; and to change font characteristics, footnote markers, and the width of data cells. Chart Editor specific menus Options Use the Options menu to change x/y reference line and add title. Element Use the Element menu to add a fitted regression line in a scatter plot. Text Output Editor specific menu Insert Use the Insert menu to change the page breaks. Syntax Editor specific menu Run Use the Run menu to run the selected commands. Script Editor specific menu Macro Use the Macro menu to run your code. Debug Use the Debug menu to step through your code, executing one line or subroutine at a time and viewing the result. You can also insert a break point in the script to pause the execution at the line that contains the break point.
Click the tabs for the settings you want to change. Change the settings. Click OK or Apply. For example, within variable list boxes in dialogs, you have the option to display the variable name as always or the entire variable label (up to 256 characters) can be displayed. Click General from the Options dialog box Click either Display labels or Display names under the Variable Lists Click OK
Suppose you have three test scores collected from a class of 10 students (5 males, and 5 females) during a semester. Each student was assigned an identification number. The information for each student you have is an identification number, gender of each student, and scores for test one, test two, and test three (the full data set is displayed toward the end of this section for you to view). Your first task is to present the data in a form acceptable to SPSS for processing. SPSS uses data organized in rows and columns. Cases are represented in rows and variables are represented in columns. variable Name Tim Hans Test1 20 21 Test2 23 26 Test3 24 28 case
A case contains information for one unit of analysis (e.g., a person, an animal, a machine). Variables are information collected for each case, such as name, score, age, income, educational level. In the above chart, there are two cases and four variables. In SPSS, less than eight characters of variable names are recommended. They must begin with a letter, although the remaining characters can be any letter, any digit, a period, or the symbols (@, #, _, or $). Variable names cannot end with a period. Variable names that end with an underscore should be avoided. Blanks and special characters such as &, !, ?, ', and * cannot be used in a variable name. Variable names are not case sensitive. Each variable name must be unique; duplication is not allowed. Most variables are generally numeric (e.g., 12, 93.23) or character/string/alphanumeric (e.g., F, f, john). You can have more than 40 characters but only the first 16 digits are correct. The maximum number of decimal positions depends on the number of digits you have before the decimal point because the total valid digits for the numeric variable is 16. String variables with a defined width of eight or fewer characters are short strings, more than eight characters (up to 255 characters) are long strings. Short string variables can be used in many SPSS procedures. You may leave a blank for any missing numeric values or enter a user-define missing (e.g., 9, 999) value. However, for string values a blank is considered a valid value. You may choose to enter a user-defined missing (e.g., x, xxx, na) value for missing short string variables, but long string variables cannot have user-missing values. Following the conventions above, let us assign names for the variables in our data set: id, sex, test1, test2, and test3. Once the variables are named according to SPSS conventions, it is a good practice to prepare a code book with details of the data layout. Following is a code book for the data in discussion. Note that this step is to present your data in an organized fashion. It is not mandatory for data analysis. A code book becomes especially handy when dealing with large number of variables. A short sample data, like the following, may not need a code book, but it is included for illustration.
var. name id sex test1 test2 test3 width 2 1 2 2 2 columns 8 8 8 8 8 var. type Numeric String Numeric Numeric Numeric var. labels identification no. student gender (f, m) test one score test two score test three score
In the above code book, width indicates the length of a variable measured in digits or characters. For example, the value for variable id takes a maximum of two fields since the highest identification number in our example is going to be 10. The value for variable sex takes a maximum of one field, and so on. Columns affect only the display of values in the Data Editor. Changing the column width does not change the defined width of a variable. Var. type specifies the data type (numeric, comma, dot, scientific notation, date, custom currency or string). In our example, sex is the only string variable coded as f for female, m for male. The next issue is entering your data into the computer. There are several options. You may create a data file using one of your favorite text editors, or word processing packages (e.g., Word Perfect, MS-Word). Files created using word processing software should be saved in text format before trying to read them into an SPSS session. You may enter your data into a spreadsheet (e.g., Lotus 123, Excel, dBASE) and read it directly into SPSS for Windows. Finally, you may enter the data directly into the spreadsheet-like Data Editor of SPSS for Windows. In this document we are going to examine two of the above data entry methods: using a text editor/word processor, and using the Data Editor of SPSS for Windows.
Open up your editor session, or word processing session, and enter the variable values into appropriate columns as outlined in the code book. If you are using a word processor, make sure to save your data in text format. Your completed data file will appear as follows. (Note: The first line is included as a column marker line and is not part of the data. It must be removed before saving or using the data for analysis.)
12345678901234567890 01 f 83 85 91 02 f 65 72 68 03 f 90 94 90 04 f 87 80 82 05 f 78 86 80 06 m 60 74 64 07 m 88 96 92 08 m 84 79 82 09 m 90 87 93 10 m 76 73 70
Save the data as a text file named, grade.dat, onto a flash drive or onto the hard drive. Notice that in the above data layout one blank space is left after each variable as specified in the code book. It is optional whether to leave a space between variable values. For example, you may choose to enter the data as following:
01f838591 02f657268 03f909490 04f878082 05f788680 06m607464 07m889692
Whichever style (format) you choose, as long as you convey the format correctly to SPSS, it should not have any impact on the analysis. In the above layout, each case/observation has only one line (record) of data. In another situation you may have multiple records per observation.
Click and drag with your mouse to highlight the lines entered, then click Run and choose selection. Alternatively, you can click from the toolbar The command file will read the specified variable values from the data file, grade.dat, on C:\TEMP, and create a system file, sample1.sav, on C:\TEMP. Make sure you specify the pathname; appropriately indicating the location of the external data file and where the newly created file is to be written. However, you do not have to save a system file to do the analysis. This means the last line is optional for data analysis. Every time you run the above lines, SPSS does create an active file stored in the computer's memory. However, for large data sets, it will save processing time if you save it as a system file and access it for analysis. In the above command lines, DATA LIST defines a raw data file by assigning names and formats to each variable in the file. They can be
in fixed format (values for the same variable are always entered in the same location on the same record for each case) or in free format (values for consecutive variables are not in particular columns but are entered one after the other, separated by blanks or commas). In our example, we used the fixed format. FIXED is the default if no format is specified. That is, in our example we did not have to use the FIXED keyword, but it is included for the sake of illustration. The only string variable in the data is sex, which is identified with a (A) after the variable name and column location. We do not have any numeric variables with decimal places. SPSS assumes that decimal points are explicitly coded in the data file. If there are no decimal points, the numeric variables are assumed to be integers. To indicate noninteger values for data that have not been coded with decimal points, specify the implied number of decimal places in parentheses after the variable name and column location as in gpa 1618 (2). This means the variable gpa is in columns 16-18 and is recorded as, for example, 389, and it will be assigned 3.89 by SPSS.
Inline data
In the above example your data are being read from an external file, grade.dat, on C:\TEMP. Still another option is to keep the data within the command file. In such an instance you direct SPSS to read your inline data from the command lines with the BEGIN DATA and END DATA commands. In this mode of data input you will omit the FILE subcommand from the DATA LIST command. The BEGIN DATA command follows the DATA LIST command, and the END DATA command follows the last line of data. All procedure commands should come after the END DATA command, but transformation commands can be specified before BEGIN DATA. For example, if you want to read the above data file, grade.dat, as inline data, you should modify the above command lines as following:
DATA LIST FREE / id * sex (a) test1 test2 test3. BEGIN DATA 01 f 83 85 91 02 f 65 72 68 03 f 90 94 90 04 f 87 80 82 05 f 78 86 80 06 m 60 74 64 07 m 88 96 92 08 m 84 79 82 09 m 90 87 93 10 m 76 73 70 END DATA. EXECUTE. SAVE OUTFILE='C:\TEMP\SAMPLE1.SAV'.
In this example, we used a FREE format data layout for illustration. Each variable value is separated by a blank space. Since we are using free format, the column specification, after each variable, is dropped. Note that the variable sex is a one-character string variable. In free field format, when you specify a string format, that format applies to all preceding variables. This means SPSS will regard both id and sex to be read with the string format. To avoid this, place an asterisk (*) after the variable id, to convey that id must be read with the default numeric format. FIXED format can be used with inline data. You may type the above lines in to a Syntax Editor window, or read in the text file with inline data into a Syntax Editor window and execute it as explained above. Keeping data inline may not be an efficient option when you have a large number of data lines.
Step 6 of 6: Keep all default checks and click finish. The data file is read into the SPSS. We can save the data file as SAMPLE1.SAV.
Click on the Data View tag. Now enter the data pressing [Tab] or the right arrow key after each entry. After entering the last variable value for case number one use the arrow key to move the cursor to the beginning of the next line. Continue the process until all the data are entered.
In the box below File Name type C:\TEMP\sample1.sav. Click OK The data will be saved as an SPSS format file which is readable only by SPSS for Windows. Note that the data file, grade.dat, you saved earlier and the file, sample1.sav, you saved now are in different formats. Even after saving the data file, the data will still be displayed on your screen. If not, select sample1.sav-SPSS Data Editor from the
Window menu.
In the box titled Target Variable type in average as the variable name you want to assign to the mean score Move the pointer to the box titled Numeric Expression: and type: mean (test1, test2, test3) Click OK A new column titled average will be displayed in the Data Editor window with the values of the mean score for each case. The number of decimal places in a newly created variable can be tailored by selecting Edit Options Data Display format for new numeric variables prior to creating new variables. This display format setting affects the formats of all new subsequent numeric variables.
FREQUENCIES
To run the FREQUENCIES procedure: Select Descriptive Statistics from Analyze menu Choose Frequencies... A dialog box appears. Names of all the variables in the data set appear on the left side of the dialog box.
Select the variable sex from the list. It is highlighted. Click the arrow button right to the selected variable. Now the selected variable appears in a box on the right and disappears from the left box. Note that when a variable is highlighted in the left box, the arrow button is pointed right for you to complete the selection. When a variable is highlighted in the right box, the arrow button is pointed left to enable you to deselect a variable (by clicking the button) if necessary. If you need additional statistics besides the frequency count, click the Statistics... button at the bottom of the screen. When the Statistics... dialog box appears, make appropriate selections and click Continue. In this instance, we are interested only in frequency counts. Click OK The output appears on the Viewer screen Frequencies
DESCRIPTIVES
Our next task is to run the DESCRIPTIVES procedure on the four continuous variables in the data set. Select Descriptive Statistics from the Analyze menu Choose Descriptives... A dialog box appears. Names of all the numeric variables in the data set appear on the left side of the dialog box.
Click the variable average and click the arrow button to the right of the selected variable Do the same thing for the variables test1 through test3 Now the selected variables appear in the box on the right and disappear from the box on the left. The mean, standard deviation, minimum, and maximum are displayed by default. The variables are displayed, by default, in the order in which you selected them. Click Options... for other statistics and display order. Click OK The following output will be displayed on the Viewer screen. Descriptives
MEANS
Suppose you want to obtain the above results for males and females separately. The MEANS procedure displays means, standard deviations, and group counts for dependent variables based on grouping variables. In our data set sex is the grouping variable and test1, test2, test3, and average are the dependent variables. To run the MEANS procedure: Select Analyze Compare Means Means... Select test1, test2, test3, and average as the dependent variables Select sex as the independent variable Click Options...
Select Mean, Number of cases, and Standard Deviation. Normally these options are selected by default. If any other options are selected, deselect them by clicking them Click Continue Click OK The output will be displayed on the Viewer screen.: Means
There may be other situations in which you want to select a specific category of cases from a grouping variable (e.g., ethnic background, socio-economic status, education). To do so, choose Data Select Cases... to select the cases you want and do the analysis (e.g., from the grouping variable educate, select cases without a college degree). However, make sure you reset your data if you want to include all the cases for subsequent data analysis. If not, only the selected cases will appear in subsequent analysis. To reset your data choose Data Select Cases... All Cases, and click OK.
SPSS Output
Working with Output
When you run a procedure in SPSS, the results are displayed in the Viewer window in the order in which the procedures were run. In this window, you can easily navigate to whichever part of output you want to see. You can also manipulate the output and create a document that contains precisely the output you want, arranged and formatted appropriately. You can use the Viewer to: Browse output results or show or hide selected tables and charts Change the display order of output by moving selected items Access the Pivot Table Editor, Text Output Editor, or Chart Editor for modifying output Move items between SPSS and other applications The Viewer is divided into two panes. The left pane contains an outline view of the output contents. The right pane contains statistical tables, charts, and text output. You can use the scroll bars to browse the results, or you can click an item in the outline to go directly to the corresponding table or chart. Suppose you want to copy the Descriptives table into another Windows application, such as a word processing program or a spreadsheet. Click the Descriptives table Select Edit Copy Switch to target application From the menus in the target application you can choose either Edit Paste or Edit Paste Special... If you choose Edit Paste Special... select the type of object you want to paste Edit/Paste Special... allows you to paste the SPSS output as an embedded object into the target application. The pasted object can be activated in place by clicking then edited as if in SPSS.
exp (previous computer experience in months/yrs) school (name of school system) C1 thru C10 (10 scores on the computer anxiety scale) M1 thru M10 (10 scores on the math anxiety scale) mathscor (math score for the same testing period) compscor (computer test score for a given testing period) The first four variables (id, sex, exp, school) are background variables. The variable sex has two levels (M=male, F=female). Exp (prior computer experience) has three levels (1=less than one year, 2=1-2 years, 3=more than 2 years), school (type of school system) has three levels (1=rural, 2=suburban school, 3=urban school). The next 20 variables (C1..C10, M1..M10) are Likert type responses to computer opinion and math anxiety surveys. The remaining variables (mathscor, compscor) are scores on the math test and computer test. A copy of the sample data file is available from the Stat/Math Web home page (http://www.indiana.edu/~statmath). To obtain a copy of the file: Launch a Web browser (e.g. Internet Explorer or Mozilla Firefox) Go to the URL: http://www.indiana.edu/~statmath Select SPSS under Software Support Select Sample Data , then clas.dat (data) Save this as a text file (e.g. in Mozilla Firefox, right click on clas.dat and Save Link As... ) to a flash drive.
Use the mouse to highlight the command lines and click Run. The command lines will be executed and an active SPSS file will be created. Select Window Untitled - SPSS Data Editor to see the data file you just read in. Save the data file as an SPSS system file to drive C or to other hard drive. Select File Save Type in a filename (e.g., clas.sav) A copy of the file will now be saved in SPSS format. Now you are ready for further data analysis.
Correlation analysis
A correlation analysis is performed to quantify the strength of association between two numeric variables. In the following task we will perform Pearson correlation analysis. The variables used in the analysis are mathscor (Score in Mathematics), compscor (Score in Computer Science), compopi (Total for Comp Survey), and mathatti (Total for Math Atti Scale). Select Analyze Correlate Bivariate... This opens the Bivariate Correlations dialog box. The numeric variables in your data file appear on the source list on the left side of the screen. Select compopi, compscor, mathatti and mathscor from the list and click the arrow box. The variables will be pasted into the selection box. The options Pearson and Two-tailed are selected by default.
Click OK A symmetric matrix with Pearson correlation as given below will be displayed on the screen. Along with Pearson correlation coefficient r, the p-values and the number of cases are also displayed. Correlations
Click OK The output will now be displayed on the screen as shown below: Regression
T-test
T-test is a data analysis procedure to test the hypothesis that two population means are equal. SPSS can compute independent (not related) and dependent (related) t-tests. For independent t-tests, you must have a grouping variable with exactly two values (e.g., male and female, pass and fail). The variable may either be numeric or character. Suppose you have a grouping variable with more than two categories. You may use the RECODE (Transform/Recode) command to collapse the categories into two groups. For example, a variable, exp, has 3 categories. You want to collapse this into two categories (1 = < 1 yr. exp, 2 = one or more yrs.) and create a new variable, newexp. The syntax is:
recode exp (1 = 1) (2,3 = 2) into newexp. execute.
RECODE is a powerful SPSS command for data transformation with both numeric and string variables. In the following task, we will perform an independent t-test. The test variables are mathscor (Score in Mathematics), and compscor (Score in Computer Science), and the grouping variable is newexp. Select Analyze Compare Means Independent-Samples T-test... Select compscor, and mathscor as the Test Variables Select newexp as the Grouping Variable. Click on Define Groups... Type 1 for Group 1, and 2 for Group 2.
The output will now be displayed on the screen as shown below: T-Test
A t-test with two related variables is performed using the Paired-Samples T-Test from the Analyze Compare Means menu. The paired T-test is applicable for data collected in a pre-post (before and after) kind of situation.
Click OK The output will be displayed on the screen as shown below: Oneway
Further Reading
The material covered in this document illustrates some of the basic features of SPSS for Windows. Examining additional features of SPSS for Windows is beyond the scope of this document. For further help, refer to SPSS for Windows documents. If you need assistance in using SPSS for Windows contact the UITS Stat/Math Center. The basic documents for SPSS for Windows are: SPSS 18 Brief Guide SPSS Base 18 SPSS 18 Command Syntax Reference SPSS Advanced Statistics 18 SPSS Regression 18 GPL Reference Guide SPSS 18 Algorithms Documentation for other add-on modules (e.g., Tables, Trends, and Categories) are also available. Documents may be purchased through any local bookstore, or directly ordered from SPSS, Inc. Those who wish to contact SPSS, Inc. directly for information on SPSS for Windows may call 800/543-2185.