Guidelines in defining Variables in SPSS
Also each variable name should be unique without duplication. They can be upto 64 bytes long though. This name must be 8 characters long or fewer, and the first character must be a letter or one of the characters @, #, or $. Subsequent characters can be any combination of letters, numbers, non-punctuation characters, and a period (.). Though we can use “Chelsea_Football”, we cannot use “Chelsea-Football” nor can we use “Chelsea Football” as variable names. The SPSS tool misinterprets “–“ as subtraction sign. The space confuses the software as to how many variable are being named. Since variable names often tend to be cryptic and they must be 8 characters or less. Label allows to specify a longer variable name to give in more clarity about the variable. This longer label will appear on any charts or graphs produced.
Two types of variable that can be used are numbers and strings. Numeric variables may only have numbers assigned and string variables may contain both numbers and letters. But the catch here is that a string variable though can hold a number cannot be used for numeric operations on it. These operations include mean, variance, standard deviation, etc. By default all variables are assumed to be numeric. Other types of variables which can be used are comma, dot, scientific notation, date, dollar, custom currency and restricted numeric. In all cases, one will need to specify the variable width. It can be done in the dialogue box, or in the subsequent width and decimal columns.
Values allow connecting the values (numbered codes) of the coding scheme to the original category. For example, it I here that for a variable Sex, males can be coded with a 0 and females with a 1. Codes are to be added on after the other in a sequence.
Missing refers to a missing data code. This is a “special” number that SPSS will treat as a unique code to identify places where there is no data. The SPSS will avoid including it as a “real” number when statistics are computed.
Columns refers to how many columns wide you would like the variable to be presented in the “ data view.” Normally this would be at least 8 so that the variable name could appear easily.
Measurement of the Variable
The level of measurement of ratio and intervals cannot be differentiated by the SPSS software. These two measurements are grouped together as scale. Nominal and ordinal however are differentiated.
Nominal variables are also known as categorical variables. The different codes here refer to different categories that [e.g., SEX is a categorical variables because the two different groups are simply different categories that bear no mathematical relation to each other).
Ordinal variables refer to those variables where the numerical codes reflect an ordering of some sort, but where the distance between the categories can vary. For example, “Job Grade” is an ordinal variable – the professorial ranks are ordered (1) Grade 6 (2) Grade 7; and (3) Grade 8 – but the distances between the codes are not necessarily equal.
Scale variables include interval and ratio levels of measurement, where any numeric codes have meaning in terms of number relations that go beyond category and order. If it makes sense to compute a mean for the variable, then it probably is a scale variable.