Title: SPSS Intro and Analysis
1SPSSIntro and Analysis
- Hein Stigum
- Presentation, data and programs at
- http//folk.uio.no/heins/
2Analysis with SPSS
- SPSS introduction
- Files and menus
- syntax
- Analysis
- Continuous data
- Symmetrical
- Skewed
- Categorical data
3Files
- Data .sav Data Editor
- Syntax .sps Syntax Editor
- Output .spo ViewerChart Editor
Menus Toolbars Vary with file/editor Statusbar
4Data Editor
- Variable view
- Each variable name, type, label, value labels
- Data view
- Each case values
- Save a master file, work on workfile
5Syntax Editor
- Syntax
- Comands ends with a .
- Comments starts with
6Ways of working
- Use menus to run commands
- Use menus, paste commands, run
- Write commands, run
- Your main product The Syntax File !!
7Viewer
- Contains all output
- Show/hide or delete elements
- Double-click to edit element
- Double-click on chart to start Chart Editor
8Select and Filter
Do analysis on old people
- Method 1, select
- Select if (agegt50).
- Method 2, filter
- Compute ff(agegt50).
- Filter by ff.
-
- Filter off.
9Recode and label
- Cut age into 3 groups
- recode age (missingsysmis) (lowest thru 291)
(30 thru 392) (40 thru highest3) into ageGr3. - Add labels
- variable label ageGr3 Age in 3 groups.
- value label ageGr3 1?29 years 230-39 years
3?40 years. - Cut age into equal sized groups
- Rank age /ntiles(3) into ageGr3.
- Examine age by ageGr3 /plotnone.
10Compute and If
Compute ageSqrage2.
If (agelt50) old0. If (agegt50) old1.
Compute old(agegt50).
Comp oldMale0. If (agegt50 and sex1) oldMale1.
Compute oldMale (agegt50 and sex1).
Compute idcasenum.
11Missing
- System missing
- Empty values are marked . and called sysmis
- User missing
- Set to missing missing age (999).
- Set to value missing age ().
- Selection
- Remove all missing select if (not missing(age))
12Options
- Show variable names
- Edit, options, general, show names
- Show label values
- Edit, options, output labels, Values and Labels
13Analysis
14Datatypes
- Categorical data
- Nominal married/ single/ divorced
- Ordinal small/ medium/ large
- Numerical data
- Discrete number of children
- Continuous weight
15Data type dictates type of analysis
16Continuous symmetrical data
17Check for normality
graph /histogram(normal) debut.
pplot debut /typeQ-Q /distnormal.
18Describe continuous data
What is the distribution and the mean of weight?
- Distribution
- graph/histogram weight
- Describe
- descriptive weight
19Compare groups, equal variance?
20Compare means
Do boys and girls have the same average weight?
- T-test
- Analyze, Compare means, Independent-Samples
T-test - Anova
- Analyze, Compare means, One-Way ANOVA
- Options, homogeniety of variance test
Does weight vary with social group? (3 or more
groups)
21Test situations
- 1 sample test
- Weight 10
- 2 independent samples
- Weight by sex
- K independent samples
- Weight by age groups
- 2 dependent samples (Paired)
- Weight last year Weight today
22Continuousskeweddata
23Partners
Percentiles 25 2 partners 50 (median) 5
partners 75 10 partners 90 20 partners
0
10
20
30
40
50
5
2
Number of lifetime partners
24Describe skewed data
- Medians and percentiles
- Analyze, Descriptive, Statisticsdescriptives and
percentiles, PlotsBox
25Compare skewed distributions
Do boys and girls have the same height?
- 2 independent samples
- Analyze, Compare means, Means, height by sex,
Optionsmedians - Analyze, Non-parametric, 2 independent Samples,
height by sex(1 2) - K independent samples
- Analyze, Non-parametric, K independent samples
26Categoricaldata
27Describe and compare categorical data
Do boys and girls have the same educational plans?
- Frequency tables
- Analyze, Descriptives, Frequencies
- Crosstables
- Analyze, Descriptives, Crosstabs, Rowplans,
Columnsex, Statchi, Cellscolumn
Syntax freq plans. cross plans by sex /cellscol
/statchi.
28Table of descriptives
29Table of tests