values or enter a user-missing (e.g., 9, 999) value. However, for string values a blank
is considered a valid value. You may choose to enter a user-missing (e.g.,x, xxx, na)
value for missing short string variables, but long string variables cannot have user-
missing values.
Following the conventions above, let us assign names for the variables in our data set:
id, sex, test1, test2, and test3. Once the variables are named according to SPSS
conventions, it is a good practice to prepare a code book with details of the data
layout. Following is a code book for the data in discussion. Note that this step is to
present your data in an organized fashion. It is not mandatory for data analysis. A
code book becomes especially handy when dealing with large number of variables. A
short sample data, like the following, may not need a code book, but it is included for
illustration.
var. name width columns var. type var.
labels id 2 8 Numeric
identification no. sex 1 8
String student gender (f, m) test1 2
8 Numeric test one score test2 2
8 Numeric test two score test3 2
8 Numeric test three score
In the above code book, width stands for the number of fields/columns taken by each
variable. For example, the value for variable id takes a maximum of two fields since
the highest identification number in our example is going to be 10. The value for
variable sex takes a maximum of one field, and so on. Columns affect only the
display of values in the Data Editor. Changing the column width does not change the
defined width of a variable. Var. type specifies the data type (numeric, comma, dot,
scientific notation, date, custom currency or string). In our example, sex is the only
string variable coded as f for female, m for male.
The next issue is entering your data into the computer. There are several options. You
may create a data file using one of your favorite text editors (e.g., TextEdit). Files
created using word processing software should be saved in text format before trying to
read them into an SPSS session. You may enter your data into a spreadsheet (e.g.,
Excel) and read it directly into SPSS for Mac OS. Finally,you may enter the data
directly into the spreadsheet-like Data Editor of SPSS for Mac OS. In this document
we are going to examine two of the above data entry methods: using a text editor, and
using the Data Editor of SPSS for Mac OS.
Using an Editor to Enter Data
Let us first look into the steps for using a text editor for entering data. Note that if you
have a data set with a limited number of variables, you may want to use the Data
Editor to enter your data. However, this example is for illustration purposes. Open up
your editor session, or word processing session, and enter the variable values into