23.07.2013 Views

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<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 />

Figure 28: Conditional compute – def<strong>in</strong><strong>in</strong>g the transformation<br />

(iii) Click on the button marked and select .<br />

(iv) Select gender from the list <strong>of</strong> variables and transfer it to the box on the right us<strong>in</strong>g the<br />

transfer arrow .<br />

(v) Complete the condition by typ<strong>in</strong>g =‘f’ after the word ‘gender’.<br />

The dialog box should now look like Figure 29.<br />

Figure 29: Conditional compute – specify<strong>in</strong>g the condition<br />

(vi) Click on .<br />

If we were to click on at this stage, the value <strong>of</strong> sal<strong>in</strong>cr for male employees would be<br />

undef<strong>in</strong>ed. It would be assigned the system miss<strong>in</strong>g value. To avoid this, we could have<br />

performed an <strong>in</strong>itial unconditional compute operation, by assign<strong>in</strong>g a value <strong>of</strong> 0 to sal<strong>in</strong>cr for all<br />

employees. An alternative method is to use the Paste button and <strong>in</strong>sert this extra transformation<br />

<strong>in</strong>to the <strong>SPSS</strong> commands.<br />

Information Systems Services Page 24 <strong>of</strong>36<br />

Version 4.1 (December 2006) tut113_vn17nov2009.doc}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!