Uploaded by Yanan Zhang

1.SPSS Basic I

advertisement
SPSS Basic I
Database Setup Using SPSS
Wong Hung Chew
Senior Biostatistician
Biostatistics Unit,
Yong Loo Lin School of Medicine, NUS
email: medwhc@nus.edu.sg
Type of Data
• Quantitative Data (Numerical data)
– age, weight, height
• Qualitative Data (Categorical data)
– gender, race, education level
• Date
– date of birth, date of 1st admission, date of death,
date of surgery
• String
– name, description
1
Clinical Research Form (CRF)
(Participants coming for the course)
• Identification Number
• Name
• Gender
(1= male, 2 = female)
• Race
(1 = chinese, 2 = malay, 3 = indian, 4 = others ______)
• Age / age groups / date of birth
• Reason (1 stats, 2 spss, 3 cme, 4 too free, 5 others _______)
Start > All Programs > IBM SPSS Statistics > IBM SPSS
Statistics 20
Click ‘Cancel’ for
new database.
Click ‘OK’ for
opening of
existing
database .
2
Variable View
Data View
2 folders
a. Variable view: Spreadsheet to define the variables for the database
b. Data view
: Spreadsheet to enter/view data
Defining Variables
Variable Name: have to begin with an alphabet, no space or special
characters (eg #, etc), @ is fine and up to 64 characters long
Variable Type
Common Types :
a. Numeric
b. Date
c. String (Text)
Variable Label: Extended description of the variable name
3
Defining Variables
Defining idno (Identification Number)
Defining Variables
Defining name
4
Defining Variables
Defining gender (1 = male, 2 = female)
Value: 1
Label: male
Click Add
Value: 2
Label: female
Click Add
Defining Variables
Defining race (1 = chinese, 2 = malay, 3 = indian, 4 = others)
Value: 1
Label: chinese
Click Add
Value: 2
Label: malay
Click Add
Value: 3
Label: indian
Click Add
Value: 4
Label: others
Click Add
5
Defining Variables
Other Race, specify
Defining Variables
DOB: Date of Birth
Choose the 4
digit year date
format.
6
Defining Variables
Reason
Defining Variables
Reason
7
Defining Variables
Reason
Defining Variables
Reason
8
Defining Variables
Reason
Defining Variables
Reason
9
Defining Variables
Reason
Defining Variables
Reason
10
Save Dataset
To save dataset:
File – Save As
Save Dataset
Choose the directory,
give the file a name
and save.
The extension of a
SPSS data file is
‘sav’.
11
Save Dataset
Output file
Data Entry
Data View after the
variables are
defined.
12
Data Entry
Data Entry
To show value labels:
View – Value Labels
13
Download