02.10.2012 Views

Using the Windows Interface

Using the Windows Interface

Using the Windows Interface

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.

Data Transformations 22<br />

GAUSS allows expressions that directly reference variables (columns) of a data set. This is done<br />

within <strong>the</strong> context of a data loop:<br />

dataloop infile outfile;<br />

drop wagefac wqlec shordelt foobly;<br />

csed = ln(sqrt(csed));<br />

select csed > 0.35 and married $== "y";<br />

make chfac = hcfac + wcfac;<br />

keep csed chfac stid recsum voom;<br />

endata;<br />

GAUSS translates <strong>the</strong> data loop into a procedure that performs <strong>the</strong> required operations, and <strong>the</strong>n<br />

calls <strong>the</strong> procedure automatically at <strong>the</strong> location (in your program) of <strong>the</strong> data loop. It does this by<br />

translating your main program file into a temporary file and <strong>the</strong>n executing <strong>the</strong> temporary file.<br />

A data loop may be placed only in <strong>the</strong> main program file. Data loops in files that are #include’d<br />

or autoloaded are not recognized.<br />

22-1<br />

Data Loop

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

Saved successfully!

Ooh no, something went wrong!