For example, it's extremely common to record demographic variables like sex using the number codes 1 and 2 instead of the words "male" and "female". In those cases, it almost always inappropriate to treat those variables as numbers, even though SPSS may not stop you from doing so. Importantly, numeric variables in SPSS can also be used to denote nominal (unordered) or ordinal categorical variables. Simply leave the cell blank, and SPSS will recognize it as system-missing.) (Note that one should not type in a period character in a cell to specify a missing value. When viewed in the Data View window, system-missing values for numeric variables will appear as a dot (i.e., “.”). This means that they can be sorted numerically or entered into arithmetic calculations. Numeric variables, as you might expect, have data values that are recognized as numbers. The two common types of variables that you are likely to see are numeric and string. You can use this dialog box to define the type for the selected variable, and any associated information (e.g., width, decimal places). A blue “…” button will appear.Ĭlick this and the Variable Type window will appear. Under the “Type” column, simply click the cell associated with the variable of interest. Information for the type of each variable is displayed in the Variable View tab.
SPSS has special restrictions in place so that statistical analyses can't be performed on inappropriate types of data: for example, you won't be able to use a continuous variable as a "grouping" variable when performing a t-test. In order for your data analysis to be accurate, it is imperative that you correctly identify the type and formatting of each variable.