Issuu on Google+

Table of Contents How to use Split File in SPSS ....................................................................................... 2 1.1 When should I use Split File?..................................................................................................... 2 1.2 When should I NOT use Split File?............................................................................................. 3 1.3 How to use Split File in 5 simple steps ...................................................................................... 3 When you’re done with the analysis that needed Split File… ..................................................... 5

Additional Resources.................................................................................................. 6

Created by ASK (2012)

Page 1 of 6


How to use Split File in SPSS When you use Split File in SPSS it’s like you are creating separate data files, except you will still be able to see all of the data on one sheet instead of having separate data files. You will specify a Grouping Variable (see Figure 1). Behind the scenes, SPSS considers each of the groups within the Grouping Variable to be separate from the others. After the file is split, all analysis you carry out will be done for each of the groups individually.

1.1 When should I use Split File? If you want to generate descriptive statistics or create charts and graphs for groups of subjects (or participants) separately, then use the Split File option in SPSS.

A few examples: 

I have a variable Gender and I want to generate descriptive statistics for males and females separately.  Split your file by Gender. Then generate descriptive statistics for the variable of interest(s). Results will output separately for mal es and females.

I have a variable Experimental Condition which has 3 groups: control, condition 1 and condition 2. I want to generate descriptive statistics for each of these 3 groups separately.  Split your file by Experimental Condition. Then generate descriptive statistics for the variable(s) of interest. Results will output separately for each group.

I have two variables: Highest Education Level which has 4 groups (High school, A-levels, First degree and Post graduate degree) and Gender. I want a separate bar chart for males and females which shows Highest Education Level instead of showing males and females together on a clustered bar chart.  Split your file by Gender. Then create a bar chart for Highest Education Level. A separate bar chart will output for males and females.

I have two variables: Highest Education Level which has 4 groups (High school, A-levels, First degree and Post graduate degree) and Gender. I want to generate descriptive statistics for each level of education for males and females separately (i.e., males, high school; females, highs school; males, A-levels; females, A-levels; etc…)  Split your file by Gender and Highest Education Level. Then generate descriptive statistics for the variable(s) of interest. Result s will output separately for males and females for each level of education (total of 4x2=8 tables of descriptive statistics).

Created by ASK (2012)

Page 2 of 6


1.2 When should I NOT use Split File? Do not use Split File if… 1. You only want to select one group to do analysis. For example, you want to analyse only males, but not females.  If you only want one of the groups, then use Select Cases instead. If you use Split File you will produce analyses for all groups, but separately . 2. You want to show data for all groups of a variable on one graph.  If you use Split File you will get a separate graph for each group . 3. You want to do a statistical test to compare a measurement between 2 or more groups.  If you use Split File you will either get strange results or not be able to complete the test. Remember, splitting a file is splitting your data into separate files for analysis while having the convenience of all your data still in one place. 4. You want to do a correlation to see if there is a relationship between the groups of a variable and one or more measurements.  See the comment for (2) above.

1.3 How to use Split File in 5 simple steps 1. From the Data menu, select Split File (see Figure 1). 2. From the Split File dialogue box (Figure 1) select the categorical variable to split your file by from the list of variables on the left. Move it over to the Groups Based On box on the right.  I have chosen Gender, so SPSS will consider all the data for males separate from the data for females. Think of it like having two separate data files: one with only results for males and the other with results for only females. Choose the variable which will split the file. E.g., analyse males and females separately.

3

2 4

1

Figure 1. Split File dialogue box in SPSS. Created by ASK (2012)

Page 3 of 6


3. Select ONE of the following options which will determine how your analysis will be outputted:  Compare groups: For every table you generate, results for each group of the Groups Based on variable will be joined together into one table (see Figure 2 for an example). Charts and graphs will output individually for each group.  If, after choosing Compare groups and splitting my file by Gender, I generated descriptive statistics for Gross Annual Income, SPSS would output one table: one half of the table would be a summary of income for males and the other half income for females (see Figure 2). 

Organize output by groups: For every table you generate, results for each group of the Groups Based on variable will be outputted in separate tables (see Figure 3 for an example). Charts and graphs will also output individually for each group.  If, after choosing Organise output by groups and splitting my file by Gender, I generated descriptive statistics for Gross Annual Income, SPSS would create two tables: one table would be a summary of income for males and the other table a summary of income for females (Figure 3).

Figure 2. Output from Compare groups option.

Figure 3. Output from Organise output by groups option.

Created by ASK (2012)

Page 4 of 6


4. Select Sort the file by the grouping variables (this is usually the best option to select, because rarely are data files already sorted by the grouping variable). In order to analyse the data properly after having split the file, the data in the data file MUST be sorted by the Groups Based On variable. If the file isn’t sorted, then the analysis will not be carried out properly and it is very likely SPSS will crash. It’s too complicated to explain why this happens. If you’re really curious email me for details. 5. Click OK. At first it will not seem like anything has happened. But if you look at your data file you will see that the data has been sorted by the grouping variable. Now you are ready to run your analysis with your split file.

When you’re done with the analysis that needed Split File… You must un-split your file! Simply return to the Split File dialogue box and select the first option: Analyse all cases, do not create groups, then click OK.

Created by ASK (2012)

Page 5 of 6


Additional Resources In the Getting Started folder under the SPSS resources section, you may be interested in the following: 1. How to identify variables in your dataset 2. Levels of measurement (nominal, ordinal and scale variables) 3. How to code categorical variables (check this out if you have data from a questionnaire) 4. How to create value labels for categorical variables 5. How to code, replace and define missing values in SPSS 6. How to use Select Cases in SPSS * If you are unsure about which variables are categorical, have a look at the Levels of Measurement guide mentioned above.

Return to: 1.1 When should I use Split File? 1.2 When should I not use Split File? 1.3 How to use Split File in 5 simple steps

Created by ASK (2012)

Page 6 of 6


How to 'Split a file' in SPSS