Sunteți pe pagina 1din 10

Statistics 125 Applications Software and Software Packages

CHAPTER 4: SPSS
SPSS OVERVIEW The SPSS Environment
SPSS for Windows provides a powerful statistical analysis and data management system in a graphical environment, using descriptive menus and simple dialog boxes to do most of the work for you. Most tasks can be accomplished simply by pointing and clicking the mouse. Data Editor - a versatile spreadsheet-like system for defining, entering, editing, and displaying data. Data view. Displays the actual data values or defined value labels.

Variable view. Displays variable definition information, including defined variable and value labels, data type (for example, string, date, and numeric), measurement level (nominal, ordinal, or scale), and user-defined missing values.

80

Statistics 125 Applications Software and Software Packages


Viewer - the viewer makes it easy to browse your results, selectively show and hide output, change the display order results, and move presentation-quality tables and charts between SPSS and other applications.

Basic Steps in Data Analysis


1. Get your data into SPSS. You can open a previously saved SPSS data file; read a
spreadsheet, database, or text data file; or enter your data directly in the Data Editor. 2. Select a procedure. Select a procedure from the menus to calculate statistics or to create a chart. 3. Select the variables for the analysis. The variables in the data file are displayed in a dialog box for the procedure. 4. Run the procedure and look at the results. Results are displayed in the output Viewer.

Getting Data into the System


You can enter data directly in the Data Editor in any order in the Data view. You can enter data by case or by variable, for selected areas or for individual cells. The active cell is highlighted. The variable name and row number of the active cell are displayed in the top left corner of the Data Editor. When you select a cell and enter a data value, the value is displayed in the cell editor at the top of the Data Editor. Data values are not recorded until you press Enter or select another cell. To enter anything other than simple numeric data, you must define the variable type first. If you enter a value in an empty column, the Data Editor automatically creates a new variable and assigns a variable name. The Variable view contains descriptions of the attributes of each variable in the data file. In the Variable view: Rows are variables. Columns are variable attributes.

81

Statistics 125 Applications Software and Software Packages


You can add or delete variables and modify attributes of variables, including: Variable name Data type Number of digits or characters Number of decimal places Descriptive variable and labels User-defined missing values Column width Measurement level value

Variable Names - the following rules apply to variable names: The name must begin with a letter. 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 (to avoid conflict with variables automatically created by some procedures). The length of the name cannot exceed 64 bytes. Sixty-four bytes typically means 64 characters in single-byte languages (for example, English, French, German, Spanish, Italian, Hebrew, Russian, Greek, Arabic, Thai) and 32 characters in doublebyte languages (for example, Japanese, Chinese, Korean). Blanks and special characters (for example, !, ?, ', and *) cannot be used. Each variable name must be unique; duplication is not allowed. Reserved keywords cannot be used as variable names. Reserved keywords are: ALL, AND, BY, EQ, GE, GT, LE, LT, NE, NOT, OR, TO, WITH. Variable names can be defined with any mixture of upper- and lowercase characters, and case is preserved for display purposes. When long variable names need to wrap onto multiple lines in output, SPSS attempts to break the lines at underscores, periods, and at changes from lower case to upper case. In addition to defining variable properties in the Variable view, there are two other methods for defining variable properties: The Copy Data Properties Wizard provides the ability to use an external SPSS data file as a template for defining file and variable properties in the working data file. You can also use variables in the working data file as templates for other variables in the working data file. Copy Data Properties is available on the Data menu in the Data Editor window. Define Variable Properties (also available on the Data menu in the Data Editor window) scans your data and lists all unique data values for any selected variables, identifies unlabeled values, and provides an auto-label feature. This is particularly useful for categorical variables that use numeric codes to represent categories--for example, 0 = Male, 1 = Female.

Split File
Split File splits the data file into separate groups for analysis based on the values of one or more grouping variables. If you select multiple grouping variables, cases are grouped by each variable within categories of the preceding variable on the Groups Based On list. For example, if you select gender as the first grouping variable and minority as the second grouping variable, cases will be grouped by minority classification within each gender category.

82

Statistics 125 Applications Software and Software Packages


You can specify up to eight grouping variables. Each eight characters of a long string variable (string variables longer than eight characters) counts as a variable toward the limit of eight grouping variables. Cases should be sorted by values of the grouping variables and in the same order that variables are listed in the Groups Based On list. If the data file isn't already sorted, select Sort the file by grouping variables. Compare groups. Split-file groups are presented together for comparison purposes. For pivot tables, a single pivot table is created and each split-file variable can be moved between table dimensions. For charts, a separate chart is created for each split-file group and the charts are displayed together in the viewer. Organize output by groups. All results from each procedure are displayed separately for each split-file group.

Data Transformations
The data you start with may not always be organized in the most useful manner for your analysis or reporting needs. For example, you may want to: Create a categorical variable from a scale variable. Combine several response categories into a single category. Create a new variable that is the computed difference between two existing variables. Calculate the length of time between two dates.

Data transformation commands can be found in the transform menu item.

Obtaining functions of existing variables


Use the dialog box to compute values for a variable based on numeric transformations of other variables. You can compute values for numeric or string (alphanumeric) variables. You can create new variables or replace the values of existing variables. For new variables, you can also specify the variable type and label. You can compute values selectively for subsets of data based on logical conditions. Transform >> Compute >> Dialog Box appears

83

Statistics 125 Applications Software and Software Packages

1. Type the name of a single target variable. It can be an existing variable or a new variable to be added to the working data file. 2. To build an expression, either paste components into the Expression field or type directly in the Expression field. 3. String constants must be enclosed in quotation marks or apostrophes. 4. If values contain decimals, a period (.) must be used as the decimal indicator. 5. For new string variables, you must also select Type & Label to specify the data type. Using Functions in Expressions You can also use predefined functions in expressions. More than 70 built-in functions are available, including: Arithmetic functions Statistical functions Distribution functions Logical functions Date and time aggregation and extraction functions Missing-value functions Cross-case functions String functions

Functions are organized into logically distinct groups, such as a group for arithmetic operations and another for computing statistical metrics. For convenience, a number of commonly used system variables, such as $TIME (current date and time), are also included in appropriate function groups. A brief description of the currently selected function (in this case, SUM) or system variable is displayed in a reserved area in the Compute Variable dialog box.

84

Statistics 125 Applications Software and Software Packages


To paste a function into an expression: Position the cursor in the expression at the point where you want the function to appear. Select the appropriate group from the Function group list. The group labeled All provides a listing of all available functions and system variables. Double-click the function in the Functions and Special Variables list (or select the function and click the arrow adjacent to the Function group list). The function is inserted into the expression. If you highlight part of the expression and then insert the function, the highlighted portion of the expression is used as the first argument in the function. The function is not complete until you enter the arguments, represented by question marks in the pasted function. The number of question marks indicates the minimum number of arguments required to complete the function. Highlight the question mark(s) in the pasted function. Enter the arguments. If the arguments are variable names, you can paste them from the variable list. Using Conditional Expressions You can use conditional expressions (also called logical expressions) to apply transformations to selected subsets of cases. A conditional expression returns a value of true, false, or missing for each case. If the result of a conditional expression is true, the transformation is applied to that case. If the result is false or missing, the transformation is not applied to the case. To specify a conditional expression: Click If in the Compute Variable dialog box. This opens the If Cases dialog box. Select Include if case satisfies condition. Enter the conditional expression.

Recoding Variables
The recode dialog box allows you to reassign the values of existing variables or collapse ranges of existing values into new values. For example, you could collapse salaries into salary range categories. You can recode numeric and string variables. If you select multiple variables, they must all be the same type. You cannot recode numeric and string variables together.

85

Statistics 125 Applications Software and Software Packages

For recoding into the same variable, select the variable to be recoded and move it into the variables box.

For recoding into a different variable, select the variable to be recoded and move it into the box, then enter the name and label of the modified variable. Click change. Click the old and new values command button.

86

Statistics 125 Applications Software and Software Packages

Working with the output viewer


Viewer Results are displayed in the Viewer. You can use the Viewer to: Browse results. Show or hide selected tables and charts. Change the display order of results by moving selected items. Move items between the Viewer and other applications.

The Viewer is divided into two panes: The left pane of the Viewer contains an outline view of the 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. You can click and drag the right border of the outline pane to change the width of the outline pane.

Output Object Types


There are seven different types of output objects:

Charts. Charts (except "interactive" charts and maps). Chart objects are only included with XML and HTML destination formats. Logs. Log text objects. Log objects contain certain types of error and warning messages. Depending on your Options settings (Edit menu, Options, Viewer) log objects may also contain the command syntax executed during the session. Log objects are labeled Log in the outline pane of the Viewer.

87

Statistics 125 Applications Software and Software Packages

Tables. Output objects that are pivot tables in the Viewer. This includes Notes tables. Tables are the only output objects that can be routed to SPSS data file (.sav) format. Text. Text objects that arent logs or headings. This includes objects labeled Text Output in the outline pane of the Viewer. Trees. Tree model diagrams produced by the Classification Tree option. Tree objects are only included with XML and HTML destination formats. Headings. Text objects labeled Title in the outline pane of the Viewer. For output XML format, heading text objects are not included. Warnings. Warning objects. Warnings objects contain certain types of error and warning messages.

Navigating the Output Viewer


The initial focus in the viewer is placed on the first object of the last procedure run. This is generally a title. From there you can use the arrow keys to scroll up and down the output tree; in general, navigating the tree is intended to be functionally similar to navigating Windows Explorer.

88

Statistics 125 Applications Software and Software Packages


To activate a table or chart in the output viewer, click Enter when the object you want to activate has focus. Click Ctrl-F4 to close the object.

89

S-ar putea să vă placă și