You are on page 1of 7

Statistical Package for the Social Sciences (SPSS) Basic Instructions

1. Entering Data

Entering simple numeric data is easy. Select a cell and enter the number. The data value appears in the cell and in the cell editor. Press Enter to record the value. If you haven't named the variable, The Data Editor assigns a unique variable name. To enter non-numeric data, you first need to define the variable. Double-click on the variable name at the top of the column. Or click the Variable View tab. This displays the Variable view. Click the Type cell in the row for the variable, and then click the button in the cell. Select the data type in the Define Variable Type dialog box. For example, to enter data values that contain letters, select String. Then click OK. 2. Defining Data In addition to defining data type, you can also define descriptive variable and value labels for data values. These descriptive labels are used in statistical reports and charts. To define a variable label, click the Label cell in the row for the variable. Enter the descriptive label. To define value labels, click the Label cell in the row for the variable, and then click the button in the cell. Enter the data value and the descriptive label. Click on Add to record the value label for the data value. Click on OK when you are finished. 3. Using Value Labels for Data Entry

You can use defined value labels to enter data. If value labels arent currently displayed in the Data Editor window, select Value Labels from the View menu. Or click on the Value Labels button on the Toolbar. Click the cell where you want to

enter the value. Select the label from the list. The value is entered and the value label is displayed in the cell. 4. Reading Excel Files

To read Excel files, select Open from the File menu and Data from the sub-menu. Select the file type from the drop-down list. Select a file from the list. If the first row of the Excel file contains column headings or labels, click Read variable names from first row of data. For Excel 5 or later, you can also specify the sheet in the Excel file that you want to read. Column headings from the Excel file are used as variable names. Since variable names cannot exceed 8 characters, column headings are truncated at 8 characters. The original column heading is preserved as a variable label. If the column heading cell is blank, a default variable name is assigned. For Excel 5 or later files, if a column contains mixed data types (for example numeric and string), the data values in the column are read as string data. 5. Reading Database Files with the Database Wizard

To read any database data source, in the Data Editor, select Open Database from the File menu and choose New Query. Click the appropriate data source in the Database Wizard, and then click Next. If the data source you need isnt displayed in the list, click Add Data Source. Then use the ODBC Data Source Administrator to add the data source. In distributed analysis mode (available with the server version), the Add Data Source button is not available because only the system administrator can add data sources. For some data sources you may also have to select a file. You may also need to supply a username and password. Each table is shown in the Available Tables list. Click the plus sign (+) to show all the fields in a table. Drag and drop the table(s) you want to import into the Retrieve Fields list. Fields become variables in the Data Editor. You can also select a subset of fields. Specify join types if you are importing fields from more than one table. Select a subset of cases based on conditional expressions. Specify user-friendly variable names. Save the query to file for use in other sessions. 6. Reading Text Data Files

If your raw data are in a simple text file (standard ASCII format), select Read Text Data from the File menu. Select a text data file to read. This opens the Text Wizard.
2

The data file is displayed in the preview window. In the first step you can apply a predefined format (previously saved in the Text Wizard). In this example, we'll simply click Next since we want to define a new format. Step 2 provides information about variables. A variable is similar to a field in a database. For example, each item in a questionnaire is a variable. Fixed format means each variable is recorded in the same column location for every case. Delimited means that spaces, commas, tabs, or other characters are used to separate variables. The variables are recorded in the same order for each case but not necessarily in the same column locations. In this example, the data file is delimited. It also contains descriptive labels in the first row, which you can use as variable names. Step 3 provides information about cases. A case is similar to a record in a database. For example, each respondent to a questionnaire is a case. In the previous step we indicated that the top line of the file contains variable names -- so in this step we indicate that the data values start on the second line. The Text Wizard also needs to know how many variables to read for each case. In this example, all the data values for each case are recorded on a single line. If not all lines contain the same number of data values, the number of variables for each case is determined by the line with the greatest number of data values. Step 4 displays the Text Wizard's best guess on how to read the data file and allows you to modify the way the Text Wizard will read variables from the data file. In this example the Text Wizard correctly detected that commas are used to delimit data values. The Text Wizard also assumes that consecutive delimiters indicate missing data. In this comma-delimited file, that means that two commas without an intervening data value indicate a variable with a missing value. Step 5 controls the data format that the Text Wizard will use to read each variable and which variables will be included in the final data file. To change the format of a variable, click the variable in the preview window. Then select a format from the drop-down list. To omit a variable from the imported data file, click the variable in the preview window, and select Do Not Import from the drop-down list. Step 6 is the final step of the Text Wizard. You can save your specifications to read similar text data files. You can also paste and save the underlying command syntax. When you're ready to read the text data file, just click Finish.

7.

Transforming Data Values

To compute new data values based on numeric transformations of existing variables. Select Compute from the Transform menu. Enter the name of the target variable. Enter the numeric expression. You can paste variables from the source list, numbers and operators from the calculator pad and functions from the function list. The new variable is added to the end of the data file. 8. Analysing Data

Select Analyze from the Menu bar. Select a category from the Analyze menu. Select a procedure from the submenu. For example, you could use the Frequencies procedure to obtain counts and summary statistics. Select variables and options in a dialog box. Select variables from the source list. Use the arrow buttons to move selected variables into the target lists. And click on OK to run the procedure. The results are displayed in the Viewer. Most procedures contain the minimum specifications on a single dialog box. You can modify the analysis with optional selections on subdialog boxes. For example, in the Crosstabs procedure, you could request additional cell data. Select the optional information you want in the analysis. For example, you could add expected counts and row percentages. Click on Continue after you make your selections. Select the variables for the analysis. Click on OK to run the procedure. 9. Using the Viewer

Results are displayed in the Viewer. The left panel of the Viewer contains an outline view. The right panel contains statistical tables, charts, and text output. You can use the scroll bars to browse the results. Or you can click on an item in the outline to go directly to the corresponding table or chart. You can click and drag the right border of the outline panel to change the width of the outline panel. An open book icon next to an item in the outline pane indicates that it is currently visible in the display panel. To hide a table or chart in the display without deleting it, double-click its book icon in the outline panel. The open book icon changes to a closed book icon, indicating that the item is now hidden. To hide all the results from a procedure, click on the box to the left of the procedure name in the outline panel. To change the position of tables or charts in the display, click on the items in the outline or contents panel. Drag them

where you want to put them. Then release the mouse button to drop them in the new location. 10. Getting Explanations and Definitions of Output

To get definitions of terms displayed in a pivot table, double-click on the table. Click the right mouse button on the term you want explained. Select Whats This? from the pop-up context menu. The definition of the term is displayed in a pop-up window. 11. Pasting Results as Metafiles

To copy output into another application as a metafile, click the item in the outline or contents pane of the Viewer to select it. Select Copy from the Edit menu. In the other application, select Paste Special from the Edit menu. In the Paste Special dialog box, select Picture. The metafile retains all the font characteristics and border styles of the items at the time you copied them. But a metafile only contains the information visible at the time you copied the items from the Viewer. Information in hidden categories or layers is not contained in the metafile. To copy a pivot table into another application as unformatted text, click the item in the outline or contents pane of the Viewer to select it. Select Copy from the Edit menu. In the other application, select Paste Special from the Edit menu. In the Paste Special dialog box, select Unformatted Text. Unformatted text contains tabs between columns. You can align columns by adjusting the tab stops in the other application. 12. Creating a Chart

To create a chart, select Graphs from the menu bar. Select the type of chart you want from the Graphs menu. Choose the icon for the specific type of chart you want. You also need to indicate how your data are organized. For this example, well create a clustered bar chart for groups of cases. Click on Define. To create a clustered bar chart, you need to select a category variable and a cluster variable. For example, to show the number of people of each gender in each job category click on OK. When you create a chart, it is displayed in the Viewer. Any defined labels are automatically displayed in the chart. Descriptive variable and value labels make it easy to interpret your results. Once you have created a chart, there are many attributes you can edit to change its appearance. You can change the title, labeling, fonts, or colors. Delete categories, change the scale axis range, and swap
5

axes, and change the chart type. Double-click on the chart you want. This displays the chart in a chart window. You can edit the chart from the menus, from the toolbar, or by double-clicking on the object you want to edit. To select objects on the chart click on them. For example, clicking on the legend title puts a selection box around it. To edit a chart using the menus in a chart window, make a menu selection, and then edit the resulting dialog box. For example, if you select Legend from the Chart menu. This opens the Legend dialog box. To edit a chart using the menus in a chart window, make a menu selection, and then edit the resulting dialog box. For example, if you select Legend from the Chart menu, this opens the Legend dialog box. To insert a title, select Title from the Chart menu. Enter a title in the dialog box. Click on OK. The title now appears on your chart. To change the scale axis range and intervals, double-click on the axis. You can change the displayed range. You can change the values displayed on the axis. For example, you can change the displayed range to 250 and the increment value to 50. The scale range is now 0 to 250, with labels at 50, 100, 150, 200, and 250. Use the color tool to change the colors of a chart. Click on a chart element. Then click on the color tool on the toolbar. Select a color. Click on Apply. This applies the new color to the chart bars. 13. Getting Help

Help is available from any window with the Help menu. Topics on the Help menu opens the Help Contents tab. The Contents tab is organized by topic, like a table of contents. Double-click on items with a book icon to expand or collapse the contents. Double-click on an item to go to that help topic. Some topics have a "Show Me" button at the end of the topic. This button goes directly to a tutorial for that topic. Use the Index tab to search for topics. The Index tab is organized in alphabetical order, just like a book index. The Index tab uses incremental search to find what you're looking for. Just type as many characters as you need to find the topic. The Find tab provides full-text search. Before you can use full text search, you need to build a database of all the words in the help system. Full text search is only recommended as a last resort if you can't find what you want with the Index or Contents tabs. Most dialog boxes have a Help button that takes you directly to a help topic for that dialog box. The help topic provides general information about the dialog box. The How To button provides step-by-step instructions on how to access and use the dialog
6

box. The See Also button provides links to related topics, including any sub-dialog boxes that provide additional features. For help on individual dialog box controls, click the right mouse button on the control you want to know about. A pop-up window displays information about the control. To get definitions of terms displayed in a pivot table, double-click on the table. Click the right mouse button on the term you want explained. Select What's This from the pop-up context menu. The definition of the term is displayed in a pop-up window. 14. Results Coach

The Results Coach provides information to help you interpret your results. To access the Results Coach for pivot tables, double-click a pivot table to activate it. If the Formatting toolbar is not displayed, select Toolbar from the View menu. Click the Results Coach button on the toolbar. This displays a help topic that provides information on the selected table type. 15. Using the Statistics Coach

To use the Statistics Coach, select Statistics Coach from the Help menu. The Statistics Coach prompts you with simple questions and non-technical choices. Visual examples help you find the statistical procedure or chart thats appropriate for your data. Additional examples are also available. The Finish button takes you directly to the dialog box for the procedure. A help topic is automatically displayed with the dialog box. If you need more detailed help, click Tell me more. Annotated visual examples provide additional information that explains the types of data required for the procedure and how those types of data look in the Data Editor.

You might also like