310 likes | 332 Views
SPSS Intro and Analysis. Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/. Analysis with SPSS. SPSS introduction Files and menus syntax Analysis Continuous data Symmetrical Skewed Categorical data. Files. Data .sav Data Editor Syntax .sps Syntax Editor
E N D
SPSSIntro and Analysis Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/
Analysis with SPSS • SPSS introduction • Files and menus • syntax • Analysis • Continuous data • Symmetrical • Skewed • Categorical data H.S.
Files • Data .sav Data Editor • Syntax .sps Syntax Editor • Output .spo Viewer+Chart Editor Menus Toolbars Vary with file/editor Statusbar H.S.
Data Editor • Variable view • Each variable: name, type, label, value labels • Data view • Each case: values • Save a master file, work on workfile H.S.
Syntax Editor • Syntax • Comands ends with a ”.” • Comments starts with ”*” H.S.
Ways of working • Use menus to run commands • Use menus, paste commands, run • Write commands, run • Your main product: ”The Syntax File” !! H.S.
Viewer • Contains all output • Show/hide or delete elements • Double-click to edit element • Double-click on chart to start Chart Editor H.S.
Select and Filter • Method 1, select Select if (age>50). • Method 2, filter Compute ff=(age>50). Filter by ff. … Filter off. Do analysis on “old people”: H.S.
Recode and label • Cut age into 3 groups recode age (missing=sysmis) (lowest thru 29=1) (30 thru 39=2) (40 thru highest=3) into ageGr3. • Add labels variable label ageGr3 ’Age in 3 groups’. value label ageGr3 1’29 years’ 2’30-39 years’ 3’40 years’. • Cut age into equal sized groups Rank age /ntiles(3) into ageGr3. Examine age by ageGr3 /plot=none. H.S.
Compute and If Compute ageSqr=age**2. If (age<=50) old=0. If (age>50) old=1. Compute old=(age>50). Comp oldMale=0. If (age>50 and sex=1) oldMale=1. Compute oldMale= (age>50 and sex=1). Compute id=$casenum. H.S.
Missing • 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)) H.S.
Options • Show variable names • Edit, options, general, show names • Show label values • Edit, options, output labels, Values and Labels H.S.
Datatypes • Categorical data • Nominal: married/ single/ divorced • Ordinal: small/ medium/ large • Numerical data • Discrete: number of children • Continuous: weight H.S.
Deviations form normal Check for normality graph /histogram(normal) debut. pplot debut /type=Q-Q /dist=normal. H.S.
Distribution graph/histogram weight Describe descriptive weight Describe continuous data What is the distribution and the mean of weight? H.S.
Equal Not equal Compare groups, equal variance? H.S.
Compare means • T-test • Analyze, Compare means, Independent-Samples T-test • Anova • Analyze, Compare means, One-Way ANOVA • Options, homogeniety of variance test Do boys and girls have the same average weight? Does weight vary with social group? (3 or more groups) H.S.
Test 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 H.S.
Median 25., 50., 75. and 90. percentile Mean Partners Percentiles: 25% 2 partners 50% (median) 5 partners 75% 10 partners 90% 20 partners 0 2 5 10 20 30 40 50 Number of lifetime partners H.S.
Describe skewed data • Medians and percentiles • Analyze, Descriptive, Statistics=descriptives and percentiles, Plots=Box H.S.
Compare skewed distributions • 2 independent samples • Analyze, Compare means, Means, height by sex, Options=medians • Analyze, Non-parametric, 2 independent Samples, height by sex(1 2) • K independent samples • Analyze, Non-parametric, K independent samples Do boys and girls have the same height? H.S.
Describe and compare categorical data Frequency tables • Analyze, Descriptives, Frequencies • Crosstables • Analyze, Descriptives, Crosstabs, Row=plans, Column=sex, Stat=chi, Cells=column Do boys and girls have the same educational plans? Syntax: freq plans. cross plans by sex /cells=col /stat=chi. H.S.
Table of tests H.S.