SPSS Lessons Output Handout
PSYC 210-Burnham
1.1 What is SPSS? Statistics Package for Social Scientists (SPSS) is a software tool for analyzing data. SPSS operates like a spreadsheet program, such as Excel, and data files look a lot like Excel. Unlike Excel, SPSS is designed for manipulating and analyzing data. As part of your course requirements, you will gain basic understanding of how to use SPSS. Indeed, most statistical analyses are performed with SPSS or some other software. Why do we teach you this stuff by hand, why not just use SPSS? Simply put, it’s because without conceptual knowledge of where the results of an analysis done with SPSS come from, they’re just a bunch of numbers in a computer file! Thus, we teach you what the variance of a set of data is and where it comes from by showing you how it’s calculated. This way, variance should make sense when using SPSS. If my logic doesn’t make sense, drop out of the course and preferably out of college. :-) 1.2 Where is it Available? At the University of Scranton, SPSS / SPSS is available in the Weinberg Memorial Library (WML) on the 1st floor and in group study rooms, Brennan Hall (BRN) rooms 102 and 201, McGurrin Hall (MGH) room 110, Hyland (HYL) Café and room 102 (where statistics classes are held), and Alumni Memorial Hall (AMH) rooms 214 and 202. 1 1.3 Three Types of SPSS Files There are three main files associated with SPSS (and SPSS): 1. Data Files contain data to be analyzed, and have the extension '.sav'. Data files look a lot like a Microsoft Excel spreadsheet, with columns, rows and cells. Columns represent variables, with an abbreviated name of the variable at the top of each column. Rows represent cases, or research subjects. That is, each row/case could be the data associated with an individual, or a sample. Cells and values within the file are the data. 2. Syntax Files are used to request SPSS conduct an analysis, and have the extension '.sps'. Hence, syntax files are command files that tell SPSS what to do with data. I admit that most analyses and procedures in SPSS can be obtained through the pull-down menus in the data file; but, syntax is better for reasons given later. Syntax files are similar to text editors where you insert text-based commands for SPSS to interpret and, hopefully, run your requested analyses on the data. 3. Output Files are generated in response to SPSS running an analysis on a set of data, and have the extension '.spv' (in SPSS the extension is '.spo'). Importantly, if something was written incorrectly in the syntax file, SPSS will produce a “Warning”, usually with no additional output. Most of an output file is table-format, with the exception of graphs and charts. 1.4 Data Files (Data View) There are two different 'views' of a SPSS data file: 1. Data View, where your data can be entered by hand, and where you can view the actual values of the working data file. 2. Variable View, where you can define parameters of your variables, such as how many decimals are showing, whether the variable is a string, a date, or a numeric variable, etc. You can toggle between the Data View and the Variable View by clicking on the appropriate tab at the bottom left hand corner in any data file. You can also toggle back and forth between the Data View and the Variable View by doubleclicking on any variable name. This amounts to double-clicking a column in Data View and double-clicking any row in Variable View. I will assume that you can figure out how to insert values into a data file, so I will not cover them here. 1.5 Defining and Adjusting Variables in Data Files (Variable View) If necessary, it is good to define the parameters of your variables first, so that when when you run an analysis the output of any tables and graphs will be complete and understandable. Below, I've listed each of the parameters that can be seen 1 Thanks to Dr. Barry Kuhle (University of Scranton) for compiling this list.
-1-
SPSS Lessons Output Handout
PSYC 210-Burnham
at the top of each column in Variable View, with a brief description of what each parameter can do:
• • • • • • • • • •
NAME Refers to variables labels that you can enter, but must begin with a letter. TYPE Indicates whether a variable is numeric, a string, a date, etc. Clicking TYPE opens a dialogue box, in which you can specify the type of data contained in a variable. WIDTH Is how many numbers or letters is allowable for a value under a variable. DECIMAL The number of decimal places displayed for numeric variables. LABEL Allows you to assign a longer name to an abbreviated variable label in the data file. That is, you could 'name' a variable STAI, but 'label' the variable ‘State Trait Anxiety Inventory at time 1’. The abbreviated name appears under NAME, and the longer LABEL will appear on any tables or graphs in the output. VALUES Allows you to assign dummy-codes to variable. For example, if your data file contains the variable ‘Sex’, a 0 could refer to males and 1 could refer to females. But, 0's and 1's are arbitrary unless they are defined. This packet will show you how to assign labels using syntax. MISSING Refers to what SPSS should do with missing data entries. COLUMNS How many columns wide you want the variable name to appear in the Data View. ALIGN Allows you to have the values in each column left-justified, right-justified, or centered. MEASURE Relevant to numeric variables. Indicates the measurement scale of a variable. It allows three levels: nominal, ordinal and scale, which refers to both interval and ratio data.
1.6 Basic Structure of Output Files After you have opened a data file, performed some commands , and run an analysis, SPSS will produce an output file. The output file is what we are trying to get SPSS to provide us. It presents, in table or graph form, the descriptive and/or inferential statistics requested. As you can see in the figure below, the output contains a single table with a listing of several descriptive statistics (N, Minimum, Maximum, Mean, Standard Deviation), for two different variables (SAT_CR and SAT_M). Don't worry about the variable names right now; trust me, you'll know what they are in a bit.
-2-
SPSS Lessons Output Handout
PSYC 210-Burnham
2.1 Requesting Frequencies ◦ Analyze ▪ Descriptive Statistics • Frequencies... Statistics Sex N
Valid Missing
Coll_Class
Coll_Maj
240
240
240
0
0
0
Frequency Table Sex Frequency Valid
Percent
Valid Percent
Cumulative Percent
Males
109
45.4
45.4
45.4
Females
131
54.6
54.6
100.0
Total
240
100.0
100.0
2.2 Requesting Frequencies and Asking for More Variables ◦ Analyze ▪ Descriptive Statistics • Frequencies... Once the pop-up window appears, click the 'Statistics' button and check off which statistics you want calculated. Statistics SAT_CR N
Valid
240
Missing Mean
0 491.14
Std. Error of Mean Median
6.838 496.00
Mode Std. Deviation Variance
402a 105.938 11222.800
Skewness
.331
Std. Error of Skewness
.157
Kurtosis
.506
Std. Error of Kurtosis
.313
Range
624
Minimum
237
Maximum
861
Sum
117874
-3-
SPSS Lessons Output Handout
PSYC 210-Burnham
3.1 Requesting Descriptives ◦ Analyze ▪ Descriptive Statistics • Descriptives... Once the pop-up window appears, click the ''Options' button and check off which statistics you want calculated.
Descriptives Descriptive Statistics Std. N
Range
Minimum
Maximum
Sum
Statistic
Statistic
Statistic
Statistic
Statistic
Mean Statistic
Std. Error
Deviation
Variance
Statistic
Statistic
240
49.3
142.3
191.6
40559.5
168.998
.5922
9.1745
84.171
240
84.7
25.6
110.3
16248.1
67.700
.9066
14.0451
197.266
Height_cm Weight_kg 240 Valid N (listwise)
3.2 Splitting the Output into Groups ◦ Data ▪ Split File Once the pop-up window appears, click the radio button 'Organize Output by Groups'. Then, select which variable you want to separate the output by. Then, re-request the descriptive statistics as in section 3.1: ◦ Analyze ▪ Descriptive Statistics • Descriptives...
Coll_Class = Freshmen Descriptive Statistics Std. N
Range
Minimum
Maximum
Sum
Statistic
Statistic
Statistic
Statistic
Statistic
Mean Statistic
Std. Error
Deviation
Variance
Statistic
Statistic
57
31.2
153.3
184.5
9638.8
169.102
1.1159
8.4251
70.982
57
71.9
38.4
110.3
3847.0
67.491
1.9307
14.5762
212.467
Height_cm Weight_kg 57 Valid N (listwise)
-4-
SPSS Lessons Output Handout
PSYC 210-Burnham
Coll_Class = Sophomore Descriptive Statistics Std. N
Range
Minimum
Maximum
Sum
Statistic
Statistic
Statistic
Statistic
Statistic
Mean Statistic
Std. Error
Deviation
Variance
Statistic
Statistic
65
43.8
147.8
191.6
10923.1
168.048
1.2866
10.3732
107.604
65
64.6
25.6
90.2
4244.8
65.305
1.5937
12.8486
165.087
Height_cm Weight_kg 65 Valid N (listwise)
Coll_Class = Junior Descriptive Statistics Std. N
Range
Minimum
Maximum
Sum
Statistic
Statistic
Statistic
Statistic
Statistic
Mean Statistic
Std. Error
Deviation
Variance
Statistic
Statistic
63
46.3
142.3
188.6
10659.4
169.197
1.0615
8.4254
70.987
63
63.3
37.3
100.6
4349.2
69.035
1.7392
13.8046
190.568
Height_cm Weight_kg 63 Valid N (listwise)
Coll_Class = Senior Descriptive Statistics Std. N
Range
Minimum
Maximum
Sum
Statistic
Statistic
Statistic
Statistic
Statistic
Mean Statistic
Std. Error
Deviation
Variance
Statistic
Statistic
55
34.7
154.0
188.7
9338.2
169.785
1.2657
9.3869
88.114
55
68.1
35.8
103.9
3807.1
69.220
2.0311
15.0633
226.904
Height_cm Weight_kg 55 Valid N (listwise)
3.3 Turning Off the Split File Option ◦ Data ▪ Split File Once the pop-up window appears, click the radio button 'Analyze All Cases, Do Not Create Groups.'
-5-
SPSS Lessons Output Handout
PSYC 210-Burnham
4.1 Requesting Correlations ◦ Analyze ▪ Correlate • Bivariate If you want to request the descriptive statistics for each variable, and the cross produces and covariances between variables: click the 'Options' button, and then check off the appropriate boxes.
Correlations Descriptive Statistics Mean
Std. Deviation
N
SAT_CR
491.14
105.938
240
SAT_M
516.79
127.100
240
SAT_V
496.69
66.772
240
Correlations SAT_CR SAT_CR
Pearson Correlation
SAT_M 1
-.062
.481**
.340
.000
2682249.183
-199155.775
813393.625
11222.800
-833.288
3403.321
240
240
240
-.062
1
-.048
Sig. (2-tailed) Sum of Squares and Cross-
SAT_V
products Covariance N SAT_M
Pearson Correlation Sig. (2-tailed)
.340
Sum of Squares and Cross-
.461
-199155.775
3860928.162
-96992.938
-833.288
16154.511
-405.828
240
240
240
.481**
-.048
1
.000
.461
813393.625
-96992.938
1065571.563
3403.321
-405.828
4458.458
240
240
240
products Covariance N SAT_V
Pearson Correlation Sig. (2-tailed) Sum of Squares and Crossproducts Covariance N
-6-
SPSS Lessons Output Handout
PSYC 210-Burnham
5.1 Requesting Independent Groups t-Test • Analyze ◦ Compare Means ▪ Independent Samples T Test... Place the dependent variable to be assessed in the 'Test Variables' panel (you can select more than one). Place the independent variable in the 'Grouping Variable' panel, and be sure to identify which levels are being compared.
T-Test Group Statistics Tutor_Group Post_GREv
Post_GREa
N
Mean
Std. Deviation
Std. Error Mean
Control Group (no tutoring)
80
419.25
62.334
6.969
Individual Tutoring
80
442.88
68.993
7.714
Control Group (no tutoring)
80
4.17
.355
.040
Individual Tutoring
80
4.22
.456
.051
Independent Samples Test Levene's Test for Equality of Variances
t-test for Equality of Means 95% Confidence
F
Sig.
t
df
Sig. (2-
Mean
Std. Error
Interval of the
tailed)
Difference
Difference
Difference Lower
Equal variances Post_GREv
.978
.324
Upper
-2.273
158
.024
-23.625
10.396
-44.157
-3.093
-2.273
156.400
.024
-23.625
10.396
-44.159
-3.091
-.774
158
.440
-.050
.065
-.178
.078
-.774
149.096
.440
-.050
.065
-.178
.078
assumed Equal variances not assumed Equal variances
Post_GREa
4.221
.042
assumed Equal variances not assumed
-7-
SPSS Lessons Output Handout
PSYC 210-Burnham
5.2 Requesting Correlated Samples t-Test • Analyze ◦ Compare Means ▪ Correlated Samples T Test... Click the two variables that are to be compared, and then click the arrow button in the middle.
T-Test Paired Samples Statistics Mean Pair 1
Pair 2
N
Std. Deviation
Std. Error Mean
Pre_STAIt
50.27
240
11.923
.770
Post_STAIt
50.09
240
11.944
.771
Pre_GREq
568.71
240
76.484
4.937
Post_GREq
591.13
240
79.685
5.144
Paired Samples Correlations N
Correlation
Sig.
Pair 1
Pre_STAIt & Post_STAIt
240
.987
.000
Pair 2
Pre_GREq & Post_GREq
240
.934
.000
Paired Samples Test Paired Differences
Mean
t
Std.
Std. Error
95% Confidence Interval of
Deviation
Mean
the Difference Lower
Pair 1
Pre_STAIt -
df
Sig. (2-tailed)
Upper
.175
1.939
.125
-.072
.422
1.398
239
.163
-22.417
28.461
1.837
-26.036
-18.798
-12.202
239
.000
Post_STAIt Pair 2
Pre_GREq Post_GREq
-8-