12.07.2015 Views

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13Best Practices <strong>and</strong> Efficiency TipsStatistical <strong>and</strong> charting procedures always read the data, but most trans<strong>for</strong>mationcomm<strong>and</strong>s (<strong>for</strong> example, COMPUTE, RECODE, COUNT, SELECT IF) donotrequireaseparate data pass.The default behavior of the graphical user interface, however, is to read the data<strong>for</strong> each separate trans<strong>for</strong>mation so that you can see the results in the <strong>Data</strong> Editorimmediately. Consequently, every trans<strong>for</strong>mation comm<strong>and</strong> generated from the dialogboxes is followed by an EXECUTE comm<strong>and</strong>. So if you create comm<strong>and</strong> syntax bypasting from dialog boxes or copying from the log or journal, your comm<strong>and</strong> syntaxmay contain a large number of superfluous EXECUTE comm<strong>and</strong>s that can significantlyincrease the processing time <strong>for</strong> very large data files.In most cases, you can remove virtually all of the auto-generated EXECUTEcomm<strong>and</strong>s, which will speed up processing, particularly <strong>for</strong> large data files <strong>and</strong> jobsthatcontainmanytrans<strong>for</strong>mationcomm<strong>and</strong>s.To turn off the automatic, immediate execution of trans<strong>for</strong>mations <strong>and</strong> the associatedpasting of EXECUTE comm<strong>and</strong>s:EEEFrom the menus, choose:EditOptions...Click the <strong>Data</strong> tab.Select Calculate values be<strong>for</strong>e used.Lag FunctionsOne notable exception to the above rule is trans<strong>for</strong>mation comm<strong>and</strong>s that contain lagfunctions. In a series of trans<strong>for</strong>mation comm<strong>and</strong>s without any intervening EXECUTEcomm<strong>and</strong>s or other comm<strong>and</strong>s that read the data, lag functions are calculated afterall other trans<strong>for</strong>mations, regardless of comm<strong>and</strong> order. While this might not be aconsideration most of the time, it requires special consideration in the following cases:• The lag variable is also used in any of the other trans<strong>for</strong>mation comm<strong>and</strong>s.• One of the trans<strong>for</strong>mations selects a subset of cases <strong>and</strong> deletes the unselectedcases, such as SELECT IF or SAMPLE.Example*lagfunction.sps.

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

Saved successfully!

Ooh no, something went wrong!