How To Enter Data in SPSS
How To Enter Data in SPSS
SAS
87
SPSS
STATA
80
49
Epi Info
43
SUDAAN
S-PLUS
33
StatXact
18
BMDP
StatView
Statistica
8
0
100
200
300
400
Before you perform analysis in SPSS, lets set up the following option.
Go to Edit, Options,..
Data Editor
Viewer or Draft Viewer which displays the output files
Syntax Editor, which displays syntax files
The Data Editor has two parts:
Data View window, which displays data from the active file in
spreadsheet format
Variable View window, which displays metadata or information
about the data in the active file, such as variable names and
labels, value labels, formats, and missing value indicators.
4
10
Avoid this:
Change to:
Animal
Control1
Control2
Experiment1
Experiment2
Animal
1
2
3
4
Group
0
0
1
1
12
Date
1/2/2005
1/3/2005
1/4/2005
3/1/2005
3/2/2005
ID
1
1
1
2
2
SYSBP
130
120
120
110
140
13
9. For yes/no questions, enter 0 for no and 1 for yes. Do not leave
blanks for no. Do not enter ?, *, or NA for missing data because
this indicates to the statistical program than the variable is a string
variable. String variables cannot be used for any arithmetic
computation.
10. Put ordinal variables into one column if they are mutually exclusive.
Avoid:
Preferred:
Pain
Mild
1
0
0
Pain
Moderate
0
1
0
Severe
0
0
1
1
2
3
11. Do not make columns wider then 8 characters, unless absolutely essential.
14
15
16
In Excel, go to:
Format, Cells, select Time under Category,
Choose Data/Time format
17
18
19
20
21
22
23
Cases must be sorted in the same order in both data files. If one or
more key variables are used to match cases, the two data files must
be sorted by ascending order of the key variable.
Variable names in the second data file that duplicate variable names in
the working data file are excluded by default because Add Variables
assumes that these variables contain duplicate information. Thus
before you merge data files, you need carefully to check two variables
with the same name. If two variables contain different information,
SPSS automatically delete variable from the file, which is being
merged into (Birthday.sav).
24
25
New
Group
A
A
B
B
Group
0
0
1
1
26
27
28
29
Go back to Data View and directly type diastolic blood pressure to separate
from SysBP. For ease of data entry, you can move DiasBP right after
SysBP. Now also edit sysBP.
30
31
HT
61.00
68.00
47.00
66.00
72.00
67.00
72.00
72.00
66.00
60.00
61.00
59.00
73.00
65.00
71.00
68.00
69.00
66.00
66.00
68.00
32
33
34
35
36
Note: Before you perform this commands, make sure that Type of
variables matched between the two datasets.
37
38
39
SPSS has its great advantage in producing high level graphs and
statistical analysis by easy point-and-click operations. However,
some people may criticize SPSS for irreproducibility of analysis which
were conducted before. In fact, SPSS has a high level capacity of
programming syntax which can be saved and repeatedly operated.
Throughout the course, I will provide how to box to conduct all
analysis used in the class, here I will show how to save your
commands in syntax. I highly recommend the use of syntax for
better organization on haw has been done.
40
41
42
43
44
I find syntax very handy especially when you get tired of clicking so many times!
45
46
47
48
Data confidentiality
49