Skip to Main Content

How do I standardize variables in SPSS? | SPSS FAQ

Consider the file we call smauto that
contains four variables, make, mpg, weight and price.

get file 'c:https://stats.idre.ucla.edu/wp-content/uploads/2016/02/smauto.sav'.
list.
 
MAKE               MPG   WEIGHT    PRICE

AMC Concord         22     2930     4099
AMC Pacer           17     3350     4749
AMC Spirit          22     2640     3799
Buick Century       20     3250     4816
Buick Electra       15     4080     7827

Number of cases read:  5    Number of cases listed:  5 

You can use the descriptives command
with the save subcommand to make
standardized variables.  The command below makes standardized values for mpg and
weight (called zmpg and zweight). 
The save subcommand tells SPSS to make and save the z-scores of the variables listed on the
descriptives command.  SPSS saves the new variable(s) by placing a "z" in front of the variable name.

DESCRIPTIVES  VARIABLES = mpg weight
 /SAVE.



































Descriptive Statistics

N Minimum Maximum Mean Std. Deviation
MPG 5 15 22 19.20 3.114
WEIGHT 5 2640 4080 3250.00 541.618
Valid N (listwise) 5



You can confirm that the variables were standardized
properly with the descriptives command.

descriptives variables = mpg weight price zmpg zweight. 
Descriptive Statistics

N Minimum Maximum Mean Std. Deviation
MPG 5 15 22 19.20 3.114
WEIGHT 5 2640 4080 3250.00 541.618
PRICE 5 3799 7827 5058.00 1606.718
Zscore(MPG) 5 -1.34854 .89903 .0000000 1.00000000
Zscore(WEIGHT) 5 -1.12626 1.53245 .0000000 1.00000000
Valid N (listwise) 5



The results above show that indeed zmpg and zweight are standardized (the mean is very close to, but not exactly 0 due to slight rounding error).

Instead of accepting the default name given to the standardized variables, you can name the variables yourself.  For example, if you wanted to name the variables std_mpg and std_weight, you could include these names after each variable name.  You can also shorten the syntax to include only an abbreviation for the descriptives command.

desc mpg (std_mpg) weight (std_weight)
/save.