This quick tutorial details the rules for naming variables in the SPSS statistics package.
SPSS allows you to rename variables either via its Variable View or by using syntax. There are a number of rules governing the naming of variables.
Rules & Best Practices for Naming Variables
- Names can be safely up to 32 characters long. Names may include alphanumeric characters, non-punctuation characters, and a period (.).
- You can’t have a space in a variable name.
- Don’t end a variable name with a period.
- Don’t end a variable name with an underscore.
- You can use periods and underscores within a variable name.
- You can use upper and lower case, and a mixture thereof, within a variable name.
- You can’t use SPSS reserved keywords as a variable name (i.e., you can’t use ALL, AND, BY, EQ, GE, GT, LE, LT, NE, NOT, OR, TO or WITH).
- Each variable must be unique.
That’s it, short and sweet. If you follow those rules when naming variables, you’re not going to go wrong.