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

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

(ii) Hav<strong>in</strong>g selected Arithmetic functions, scroll down the list <strong>of</strong> Functions and Special<br />

Activity 4.6 Click on .<br />

Variables and highlight the RND function. Click on the upward arrow key to select this<br />

function.<br />

(iii) Replace the symbol ?, represent<strong>in</strong>g the argument <strong>of</strong> RND, by the expression (jobtime +<br />

prevexp)/12.<br />

The term jobtime+prevexp represents the total number <strong>of</strong> months worked. Division by 12<br />

converts this <strong>in</strong>to years. The RND function rounds the result to the nearest <strong>in</strong>teger.<br />

On completion <strong>of</strong> the expression, the dialog w<strong>in</strong>dow should resemble Figure 5.<br />

Figure 5: Compute dialog w<strong>in</strong>dow<br />

The result is shown <strong>in</strong> Figure 6, below.<br />

Figure 6: Data Editor show<strong>in</strong>g computed variable workyrs<br />

Note that if miss<strong>in</strong>g values had been present <strong>in</strong> either jobtime or prevexp, the result variable<br />

workyrs would have been assigned the system miss<strong>in</strong>g value.<br />

Figure 7 shows the <strong>SPSS</strong> commands used to perform the transformation.<br />

COMPUTE workyrs = RND((jobtime + prevexp) / 12) .<br />

EXECUTE .<br />

Figure 7: COMPUTE command<br />

Information Systems Services Page 10 <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!