Beruflich Dokumente
Kultur Dokumente
KONSENTRASI EPIDEMIOLOGI
PASCA SARJANA UNHAS
2013
PROFESSIONAL DYNAMIC
ABSTRACT SOPHISTICATED
CREATIVE MODERN
The Four Windows:
Data editor
Output viewer
Syntax editor
Script window
SPSS Files and Extensions
5/6/2011 www.ssric.org
The Four Windows: Data Editor
• Data Editor
Spreadsheet-like system for defining, entering, editing,
and displaying data. Extension of the saved file will be
“sav.”
The Four Windows: Output Viewer
• Output Viewer
Displays output and errors. Extension of the saved file will
be “spv.”
The Four Windows: Syntax editor
• Syntax Editor
Text editor for syntax composition. Extension of the
saved file will be “sps.”
The Four Windows: Script Window
• Script Window
Provides the opportunity to write full-blown programs,
in a BASIC-like language. Text editor for syntax
composition. Extension of the saved file will be “sbs.”
Data View
5/6/2011 www.ssric.org
Variable View
Variable Names
Variable Labels
Value Labels
MissingValues
5/6/2011 www.ssric.org
The basics of managing
data files
Opening SPSS
• Start → All Programs → SPSS Inc→ SPSS 20 →
SPSS 20
Opening SPSS
• The default window will have the data editor
• There are two sheets in the window:
1. Data view 2. Variable view
Data View window
• The Data View window
This sheet is visible when you first open the Data Editor
and this sheet contains the data
• Click on the tab labeled Variable View
Click
Variable View window
• This sheet contains information about the data set that is stored
with the dataset
• Name
– The first character of the variable name must be alphabetic
– Variable names must be unique, and have to be less than 64
characters.
– Spaces are NOT allowed.
Variable View window: Type
• Type
– Click on the ‘type’ box. The two basic types of variables
that you will use are numeric and string. This column
enables you to specify the type of variable.
Variable View window: Width
• Width
– Width allows you to determine the number of
characters SPSS will allow to be entered for the
variable
Variable View window: Decimals
• Decimals
– Number of decimals
– It has to be less than or equal to 16
3.14159265
Variable View window: Label
• Label
– You can specify the details of the variable
– You can write characters with spaces up to 256
characters
Variable View window: Values
• Values
– This is used and to suggest which
numbers represent which categories when
the variable represents a category
Defining the value labels
• Click the cell in the values column as shown below
• For the value, and the label, you can put up to 60
characters.
• After defining the values click add and then click OK.
Click
Practice 1
• How would you put the following information into
SPSS?
Name Gender Height
JAUNITA 2 5.4
SALLY 2 5.3
DONNA 2 5.6
SABRINA 2 5.7
JOHN 1 5.7
MARK 1 6
ERIC 1 6.4
BRUCE 1 5.9
Click
Click
Saving the data
• To save the data file you created simply click ‘file’ and
click ‘save as.’ You can save the file in different forms
by clicking “Save as type.”
Click
Transforming data
• Click ‘Transform’ and then click ‘Compute Variable…’
Transforming data (cont’d)
• Example: Adding a new variable named ‘lnheight’ which is
the natural log of height
– Type in lnheight in the ‘Target Variable’ box. Then type in
‘ln(height)’ in the ‘Numeric Expression’ box. Click OK
Click
Transforming data (cont’d)
5/6/2011 www.ssric.org
Recoding into Different
Variables
• Click on Transform > Recode > Into different variables.
• Click Continue
And then OK.
Assign Value Labels to the
Four Categories of AGE1
18 to 29 = 1
30 to 49 = 2
50 to 69 = 3
• Enter remaining 3 values.70 to 89 = 4
Exercises for Recoding
• Now recode income06 and call the new variable
income2
• This time use 8 categories: under $10K,
$10K to under $20K, $20K to under $30K,
$30K to under $40K, $40K to under $50K,
$50K to under $60K, $60K to under $75K,
and $75K and over
• Add the value labels
• Run a frequency distribution for income2 and check
to make sure that you recoded it correctly by
comparing the unrecoded and recoded frequency
distributions
Creating a New Variable
with Compute
• Let’s create a new variable and call it
timewaste which is the percentage of
relaxation time (hrsrelax) devoted to watching
TV (tvhours)
• Click on Transform > Compute
5/6/2011 www.ssric.org
Exercise for Compute
• The data file includes indexes of socio-economic
status for respondents (sei), their mothers (masei) and
their fathers (pasei).
5/6/2011 www.ssric.org
Using Select Cases to Select Specific
Cases for Analysis
• Let’s select only Protestants for further
analysis.
• Click on Data > Select Cases.
5/6/2011 www.ssric.org
Using Select Cases to Select Specific
Cases for Analysis
• Note all cases not accepted
are crossed out on the left.
• Again click on
Data > Select Cases.
5/6/2011 www.ssric.org
Important Note on Using
Select Cases
5/6/2011 www.ssric.org
Exercises for Select Cases
5/6/2011 www.ssric.org
Types of Univariate
Analysis Procedures
• Frequencies
• Descriptives
• Explore
5/6/2011 www.ssric.org
Frequencies
• Go to:
Analyze > Descriptive Statistics
> Frequencies
• Select age1 and age
• Notice Statistics and Charts
buttons at upper right and
Display frequencies tables
check-box at lower left
5/6/2011 www.ssric.org
Frequencies: Statistics
• Click on Statistics
• Select the statistics you
want
• Click on Continue
5/6/2011 www.ssric.org
Frequencies: Charts
• Click on Charts
• Select Histograms and
check With normal curve
• Click on Continue
• Click on OK
5/6/2011 www.ssric.org
Frequencies: Output - Tables
5/6/2011 www.ssric.org
Frequencies: Output - Statistics
5/6/2011 www.ssric.org
Frequencies: Output - Charts
5/6/2011 www.ssric.org
Exercises for Frequencies
5/6/2011 www.ssric.org
Descriptives
• Click on
Analyze > Descriptive Statistics
> Descriptives
5/6/2011
Descriptives
(continued)
Descriptive Statistics
5/6/2011 www.ssric.org
Exercise for Descriptives
5/6/2011 www.ssric.org
More Exercises for Descriptives
5/6/2011 www.ssric.org
Explore
• Click on
Analyze > Descriptive Statistics
> Explore
5/6/2011 www.ssric.org
Explore (continued)
• Click on Statistics
• Select the statistics you
want
• Click on Continue
5/6/2011 www.ssric.org
Explore (continued)
• Click on Plots
• Select the plots you
want
• Click on Continue
• Click on OK
Explore (continued)
Descriptives
Median 40.00
Variance 208.271
Minimum 1
Maximum 89
Range 88
Interquartile Range 12
Descriptives
Median 40.00
Variance 208.271
Minimum 1
Maximum 89
Range 88
Interquartile Range 12
5/6/2011 www.ssric.org
Graphs: Bar Charts
(continued)
Click on “Simple”
Click on “Define”
5/6/2011 www.ssric.org
Graphs: Bar Charts
(continued)
Click on “% of cases”
Drag or move
marital to
second box on right
Click on “OK”
5/6/2011 www.ssric.org
Graphs: Pie Charts
• Click on Graphs > Legacy Dialogs > Pie
5/6/2011 www.ssric.org
Graphs: Pie Charts
• Click on “Define”
5/6/2011 www.ssric.org
Graphs: Pie Charts
• Click on
“% of cases”
• Drag or move
marital to
second box
on right
• Click on “OK”
5/6/2011 www.ssric.org
Graphs: Box and Whiskers Plots
• Click on Graphs > Legacy Dialogs > Boxplots
5/6/2011 www.ssric.org
Graphs: Box and Whiskers Plots
(continued)
• Drag or move
tvhours to
first box on right
• Drag or move
degree to
second box on right
• Click on OK
5/6/2011 www.ssric.org
Graphs: Box and Whiskers Plots
(continued)
Extreme Values
(>3.0 X IQR)
Outliers
(1.5 – 3.0 IQR)
Box
Median
(IQR) Whiskers
(< 1.5 X IQR)
5/6/2011 www.ssric.org
Graphs: Scatterplots
• Click on Graphs > Legacy Dialogs > Scatterplot
5/6/2011 www.ssric.org
Graphs: Scatterplots
(continued)
5/6/2011 www.ssric.org
Graphs: Scatterplots
(continued)
• Drag or move
maeduc to
first box on right
• Drag or move
paeduc to
second box on right
• Click on OK
• Double-click on chart
• Click on “Elements”
and “Fit Line at Total”
5/6/2011 www.ssric.org
Graphs: Histograms
• Click on Graphs > Legacy Dialogs > Histogram
5/6/2011 www.ssric.org
Graphs: Histograms
(continued)
• Drag or move
realinc to
first box on right
• Check “Display
normal curve”
• Click on OK
5/6/2011 www.ssric.org
10 MINUTE BREAK!
5/6/2011 www.ssric.org
The basic analysis
The basic analysis of SPSS that will
be introduced in this class
• Frequencies
– This analysis produces frequency tables showing
frequency counts and percentages of the values
of individual variables.
• Descriptives
– This analysis shows the maximum, minimum,
mean, and standard deviation of the variables
Click Click
Frequencies
• Finally Click OK in the Frequencies box.
Click
Questions?