Basic data operations in SPSS - ISS - University of Leeds
Basic data operations in SPSS - ISS - University of Leeds
Basic data operations in SPSS - ISS - University of Leeds
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Basic</strong> <strong>data</strong> <strong>operations</strong> <strong>in</strong> <strong>SPSS</strong> for W<strong>in</strong>dows 17<br />
Version 6 (November 2009)<br />
3 Work<strong>in</strong>g with subsets <strong>of</strong> <strong>data</strong><br />
A common requirement <strong>in</strong> analysis is to be able to analyse subsets <strong>of</strong> <strong>data</strong>.<br />
<strong>SPSS</strong> allows selections to be made on either a temporary or permanent basis. Temporary selections are<br />
performed us<strong>in</strong>g a filter. When filter<strong>in</strong>g is active, all cases rema<strong>in</strong> <strong>in</strong> the <strong>data</strong> editor w<strong>in</strong>dow but only those<br />
cases filtered are used for analysis. If permanent selection is used, cases not <strong>in</strong>cluded <strong>in</strong> the selected subset<br />
are deleted from the <strong>data</strong> editor w<strong>in</strong>dow.<br />
If only a few analyses are to be carried out on subsets, filter<strong>in</strong>g would be the best approach. However, if<br />
extensive analysis is to be performed on a selected subset, it would be more efficient to use a permanent<br />
selection. If permanent selection is used, however, it is advisable to save a copy <strong>of</strong> the selected <strong>data</strong> to a new<br />
<strong>SPSS</strong> system file before proceed<strong>in</strong>g with analysis. This will protect aga<strong>in</strong>st the danger <strong>of</strong> sav<strong>in</strong>g the <strong>data</strong> to the<br />
orig<strong>in</strong>al <strong>SPSS</strong> <strong>data</strong> file, with a resultant loss <strong>of</strong> <strong>data</strong>.<br />
Data selection is performed us<strong>in</strong>g the Select Cases facility on the Data menu.<br />
When the same analysis is required for more than one subset <strong>of</strong> <strong>data</strong>, the repeated use <strong>of</strong> the Select Cases<br />
facility can become tedious. If the <strong>data</strong> set conta<strong>in</strong>s a variable whose values identify the multiple subsets, the<br />
Split File facility can be used <strong>in</strong>stead to reduce the effort <strong>in</strong> carry<strong>in</strong>g out the analyses on multiple subsets.<br />
Task 10 Select<strong>in</strong>g a subset <strong>of</strong> cases<br />
Objective To select a subset <strong>of</strong> <strong>data</strong> cases for analysis.<br />
Comment This illustrates the use <strong>of</strong> a temporary selection or filter.<br />
Problem The <strong>data</strong> file census.sav conta<strong>in</strong>s <strong>in</strong>formation relat<strong>in</strong>g to <strong>in</strong>dividuals. It is required to restrict<br />
analysis to <strong>in</strong>dividuals who are unmarried and earn<strong>in</strong>g at least £20,000 per annum.<br />
Activity 10.1 Open the <strong>SPSS</strong> <strong>data</strong> file census.sav.<br />
Activity 10.2 Select Select Cases from the Data menu. The Select Cases dialog w<strong>in</strong>dow will be displayed.<br />
Figure 33: Select Cases dialog w<strong>in</strong>dow<br />
Note the different ways <strong>in</strong> which cases may be selected.<br />
The choice ‘If condition is satisfied’ restricts cases to those satisfy<strong>in</strong>g a logical condition<br />
entered by the user. The next choice, ‘Random Sample <strong>of</strong> Cases’, selects a random subset <strong>of</strong><br />
cases based on a pseudo-random number generated by <strong>SPSS</strong>. The third option allows case<br />
Information Systems Services Page 26 <strong>of</strong>36<br />
Version 4.1 (December 2006) tut113_vn17nov2009.doc}