As you become better using SPSS Statistics software to clean data, you
will want to do quick comparisons of subgroups in your data, or to isolate one
group in particular. Now this is where split-file processing really shines!
We're going to dive deeper into split file processing in SPSS.
By default, SPSS includes all of the cases in your data set when you do an
analysis; however, sometimes we want to consider two sub groups separately. I am
going to show you four ways of splitting a file and examining groups, each of
which is useful in specific circumstances. For this example, we are
using the demo.sav data set that comes with SPSS. To find out how to open
this data set, check the links in the description. For each of these examples
we are going to use the nominal categorical variable Gender to split the
continuous scale variable Income. In this first example, we will analyze income
separately for males and females. We will first split the data set, run an
analysis on females, and then run exactly the same analysis separately for the
males. Go to Data ->Split File. Here we see the split -file dialog box. Let's begin by
displaying the variable names by right-clicking. Now you can click on
"Organize output by groups" and then move gender into the box "Groups based on" and
click OK. Split file processing is now in effect,
as we can see by this message "Split by gender" in the status bar. Now, any
analysis that we run will be run twice: once for males and again for females.
If we right-click on the variable income, and select descriptive statistics, we see
the results for females and separately for males. If we run an analysis like
correlation, or we create a graph with the chart builder, two analyses will be
run, or two charts will be created. This technique is most beneficial
if you're really only interested in one of the groups and you can ignore the
other. That way, you get only the data that you need for that one group. Another
time you might use this is if you want to display your split findings side-by-side
For example, on an academic poster. Before we continue with other techniques,
we should turn off the split file. Go to Data -> Split File, set the button to
"Analyze all cases" and click OK. This will turn off the split file processing.
This is also easy to do with syntax using the command SPLIT FILE OFF.
In the second example we will again analyze income, but this time keep the results
together. We run the same analysis on females and on males, but this time
instead of them being completely separate, we will run them so that we can
see the results side-by-side in the same table. Go to Analyze -> Descriptive
Statistics -> Explore. Place income in the dependent list and gender in the factor list.
We will use all of the other settings at their defaults, so click OK.
The findings are presented in a single pivot table, but we get many more
descriptive statistics. By default, we also get various charts or graphs that
can help us to compare the data, so this is the technique that I would use for my
initial data exploration.
Next, we are going to get descriptive statistics for income presented so that
we can easily do a comparison between the gender groups. Go to Analyze ->
Compare Means -> Means
Place income in the dependent list and gender in the independent list.
Under Options we have mean, number of cases, and standard deviation, by default. Let's add
median, and under statistics for first layer, choose ANOVA table and eta,
which is an effect size. Click Continue and OK.
Here we get the most relevant descriptive statistics and we get an
ANOVA summary table with an effect size, eta. We can see that the significance
value is 0.483 and the F is small, so these findings tell us that income does
not differ by gender in these data. This is a good initial analysis when you are
doing data exploration. It works fine for two groups, but this is the technique
that I would use if I was comparing three or more groups or levels in an
ANOVA.
Finally, we will statistically analyze the mean income for our two groups to
test whether the means are truly different, using a t-test, to answer the
research question "is income statistically significantly different
between males and females?" Go to Analyze -> Compare Means -> Independent Samples t-test.
Place income in the test variables box and gender in the grouping variable.
Define the groups as M and F, both lowercase, and click OK. Now, you will
recall that we did an ANOVA in the previous example, but the t-test is the
same math, only it's limited to two groups. Again, we see that the p-value is
non significant, and if you take the F value of 0.492 and get the square root,
you will get this t value of 0.702. Mathematically, t is the square root of F.
And again income is not statistically significantly different between males
and females. These are some quick ways to explore your data or to split an
analysis. Each of them are useful for different situations, so keep these tools
handy as you explore your data in IBM SPSS Statistics.