Next: , Up: Preparation of Data Files


5.1.1 Defining Variables

Variables come in two basic types, viz: numeric and string. Variables such as age, height and satisfaction are numeric, whereas name is a string variable. String variables are best reserved for commentary data to assist the human observer. However they can also be used for nominal or categorical data.

data-list defines two variables forename and height, and reads data into them by manual input.

     PSPP> data list list /forename (A12) height.
     PSPP> begin data.
     data> Ahmed 188
     data> Bertram 167
     data> Catherine 134.231
     data> David 109.1
     data> end data
     PSPP>

Example 5.1: Manual entry of data using the DATA LIST command. Two variables forename and height are defined and subsequently filled with manually entered data.

There are several things to note about this example.