the dependent variable of a linear regression).Įxample: Ordinal categorical variables that have been coded numerically (e.g., a questionnaire item with responses 1=Small, 2=Medium, 3=Large) should be treated as numeric variables with zero decimal places. This type of numeric variable should never be used in mathematical calculations, nor used in any statistical procedure requiring continuous numeric variables (e.g. In this situation, the Measure setting must be defined as Nominal. Certain mathematical calculations are valid when applied to count variables (e.g., mean and standard deviation), but some statistical procedures requiring continuous numeric variables may not be (e.g., the dependent variable in a linear regression), depending on the distribution of the variable.Įxample: Nominal categorical variables that have been coded numerically (e.g., recording a subject's gender as 1 if male or 2 if female) should be treated as numeric variables with zero decimal places.
In this situation, the Measure setting should be defined as Scale. This particular type of numeric variable is appropriate to use in arithmetic operations (adding, subtracting, multiplying, dividing).Įxample: Counts (e.g., number of people living in a household) should be treated as numeric variables with zero decimal places.
In this situation, the Measure setting should be defined as Scale see the Defining Variables tutorial for more information on how to set measurement levels. The researcher can choose as many or as few decimal places as they feel are necessary. So if you are examining a new dataset, you should not assume that all numeric variables represent interval or ratio variables.Īll of the following are examples of variables that could be entered as numeric variables in an SPSS dataset:Įxample:Continuous variables that can take on any number in a range (e.g., height in centimeters and weight in kilograms) should be treated as numeric variables. Although these would be defined as numeric variables in your SPSS dataset, it would not be appropriate to use them in arithmetic operations, since the number codes are stand-ins for nominal categories (and nominal categories can't be used in arithmetic operations). 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.