*“I'd like to mean center a lot of variables in order to compute interaction terms for a regression analysis. Is there an easy way to do this for many variables simultaneously?”*

## Mean Centering - What and Why

- This tutorial focuses on
*mean centering variables in SPSS*. However, we'll briefly introduce the concept first. - Mean centering a variable means subtracting its (arithmetic) mean from all its values.
- The result is that a mean centered variable has a mean of exactly zero. (Apart from that, its frequency distribution does not change.)
- Note that mean centering is also one of the two steps in
**standardizing**variables (computing their z-scores). - Mean centering without fully standardizing variables is usually done before computing
**interaction terms**in regression analysis. - Doing so decreases
**multicollinearity**between an interaction term and its corresponding main effects. It may also facilitate the**interpretation**of regression coefficients for the interaction terms.

## SPSS Mean Center Tool

SPSS Mean Center Variables Tool- Make sure you have the SPSS Python Essentials installed.
- Download and install Mean Center Variables. Note this is an SPSS custom dialog.
- Go to . Fill in the names of the variables you’d like to mean center.
- By entering a
**prefix**, mean centered variables will be created as new variables in the active dataset. With the prefix left empty, the original variables will be overwritten by their mean centered counterparts. - Click syntax. and run the pasted
- As a quick check, you could run
`DESCRIPTIVES`

on the mean centered variables to confirm that they all have zero means. - Clicking the tool's button will take you to this tutorial. We very much appreciate your feedback on it.

## This tutorial has 37 comments

## By Ruben Geert van den Berg on January 27th, 2018

Hello!

I'm on SPSS 24 as well and I just installed and ran this tool a minute ago. Did you try and install it in SPSS version 24 or higher - custom dialogs in compatibility mode?

Hope that helps!

## By YJ on January 26th, 2018

Hi,

As I tried to install the "Mean center variables" dialogue, this error message popped up: "Error reading custom dialogue specification." My SPSS is version 24, and I think I got Python installed. What is the problem? Could you help me to fix this?

Thank you.

## By Siddiqui, Abdul on January 19th, 2018

good for beginners

## By Ruben Geert van den Berg on July 31st, 2016

Hi Eszter!

Try and run DESCRIPTIVES on all relevant variables. SPSS will (rightfully) refuse to generate descriptives for string variables and throw a warning.

Now, in SPSS, you can have string variables set to scale. It doesn't make sense, though. "Scale" in SPSS means that you're dealing with a metric variable (the measurement level is interval or ratio).

The defining characteristic of metric variables is that numeric calculations (sum, mean) are meaningful for them and such calculations are not possible on string variables. So we usually see that "scale" is only used for numeric variables whereas all string variables are set to nominal but perhaps this doesn't hold for your data.

A tiny example illustrating this point is No Descriptives for Metric String Variable. If that doesn't hold for your data, please get back at me, ok?

## By Eszter Babarczy on July 30th, 2016

Hi! I ran the dialogue with 21 variables using their names. The program insists these are string variables (although they are set to scale). What am I doing wrong? Thanks a lot in advance!