When you are cleaning your raw data, you will want to check for outliers,
particularly multivariate outliers, because they can really mess up your
analysis. We are going to dive deeper into how to identify multivariate outliers using
a Mahalanobis distance test in SPSS. This is an abbreviated video for those of you
who just want to know how to conduct a Mahalanobis distance test in SPSS. If you
want fuller explanation about the multivariate outliers, including
troubleshooting common problems, please check out the full video.
For this assignment we will be working with the data set Mahalanobis_PH.sav
And to be clear, the Mahalanobis test does not require a dependent variable;
however, the only way to run a Mahalanobis test in SPSS is by using a
regression analysis, and the only way to run a regression analysis in SPSS is to
specify a dependent variable of some kind. We will completely ignore the
regression output, but we still need to have some kind of continuous variable to
use as a DV. I will use the random ID number as a dependent variable. Go to...
Analyze -> Regression -> Linear. We will begin by moving our ID number - or other random
continuous variable - into the dependent variable box. Next, we need all of the
variables that we will use in our analysis, and that may contain
multivariate outliers. Notice that we have eight scales or
eight variables. These scales were each created by taking the mean of three
items that were written to measure that construct. Those individual items have
been removed from this data set for simplicity. Move our eight variables into
the Independent variable box. Remember that we're going to ignore the
regression output, so there is nothing to set or adjust in the output, but there is
one test that we want, and it's found under the Save button. The Save menu does
not add anything to the output, but instead it does something to the
variables and then saves those results to your data set. Under Distances, click
"Mahalanobis". This will save the results of the Mahalanobis test to our data.
Click Continue and then OK. The output window pops up, but we do not need
anything in this output, so we will just close the window, and we will ignore all
of this. Instead, we are going to focus on the data. In data view, in our SPSS data
set, you will notice that we have a new variable: MAH_1. Those are
the Mahalanobis scores that SPSS saved for us. Each case has its own Mahalanobis
score. It tells us the distance between it and the other scores. Unfortunately,
this does not tell us enough. We want to know the probability that a particular
case would be THIS distance, just by chance. To interpret the Mahalanobis
scores, we are going to convert those Mahalanobis distance values into
probabilities... and to do that, we are going to create a new variable in SPSS.
Go to Transform -> Compute Variable... In the target variable box type "pMAH_1"
This will stand for the probability of the MAH_1 (aka the
Mahalanobis score). Under Function Group, select the group CDF & Noncentral CDF
These are the cumulative distribution functions for
various distributions. We want chi-square, so select Cdf.Chisq. This will
calculate the probability of a variable which follows the chi-square
distribution, such as the Mahalanobis test. We need two values here. First, we
need the variable name - which is MAH_1 and then we need the degrees of freedom,
which is the number of variables or 8. And there's one more thing to do. Because
the CDF function in SPSS computes cumulative probability from the left end
of the distribution, we actually want the inverse of this probability. So we will
subtract the whole thing from 1 to obtain the probability in the upper tail
of the distribution. Click OK. In the data set we only have two decimals, so let's
go back to the Variables - which you can do by double clicking on the name of the
variable - and we will increase the decimal points to 4. Now return to the
data - again by double clicking on the name of the variable - we want to see the
smallest Mahalanobis probabilities at the top of the column. Right-click
( or control-click on Mac) and Sort Ascending. You will now examine each of the
Mahalanobis values and eliminate those that have a probability of less than
p = .001 and here is where you have some decisions to make:
Clearly, this first one is WAY below p = .001. It is a multivariate
outlier and it should be removed. The second one is exactly p = .001.
I would remove that one, as well. This one is slightly above p = .001, but I left it in my data
set and it still caused problems later, so I would recommend removing this one
as well. These are the kinds of decisions that
you have to make we need to exploratory data analysis.
When you write up your results for data cleaning you can include a statement
like this: Data were assessed for multivariate outliers using a
Mahalanobis distance test (Tabachnick & Fidel, 2013). Three multivariate outliers were
identified and removed. -OR - "no multivariate outliers were identified"