27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

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.

AGGREGATE 95<br />

• The simplest specification is a target variable list, followed by an equals sign, a function<br />

name, and a list of source variables.<br />

• The number of target variables named must match the number of source variables.<br />

• When several aggregate variables are defined at once, the first-named target variable is<br />

based on the first-named source variable, the second-named target is based on the secondnamed<br />

source, and so on.<br />

• Only the functions MAX, MIN, FIRST, and LAST copy complete dictionary information<br />

from the source variable. For all other functions, new variables do not have labels and are<br />

assigned default dictionary print and write formats. The default format for a variable<br />

depends on the function used to create it (see the list of available functions below).<br />

• You can provide a variable label for a new variable by specifying the label in<br />

apostrophes immediately following the new variable name. Value labels cannot be<br />

assigned in AGGREGATE.<br />

• To change formats or add value labels to a working data file created by AGGREGATE, use<br />

the PRINT FORMATS, WRITE FORMATS, FORMATS, or VALUE LABELS commands. If the<br />

aggregate file is written to disk, first retrieve the file using GET, specify the new labels<br />

and formats, and resave the file.<br />

The following is a list of available functions:<br />

SUM(varlist) Sum across cases. Default formats are F8.2.<br />

MEAN(varlist) Mean across cases. Default formats are F8.2.<br />

MEDIAN(varlist) Median across cases. Default formats are F8.2.<br />

SD(varlist) Standard deviation across cases. Default formats are F8.2.<br />

MAX(varlist) Maximum value across cases. Complete dictionary information is<br />

copied from the source variables to the target variables.<br />

MIN(varlist) Minimum value across cases. Complete dictionary information is<br />

copied from the source variables to the target variables.<br />

PGT(varlist,value) Percentage of cases greater than the specified value. Default<br />

formats are F5.1.<br />

PLT(varlist,value) Percentage of cases less than the specified value. Default formats<br />

are F5.1.<br />

PIN(varlist,value1,value2) Percentage of cases between value1 and value2, inclusive.<br />

Default formats are F5.1.<br />

POUT(varlist,value1,value2) Percentage of cases not between value1 and value2. Cases where<br />

the source variable equals value1 or value2 are not counted.<br />

Default formats are F5.1.<br />

FGT(varlist,value) Fraction of cases greater than the specified value. Default<br />

formats are F5.3.<br />

FLT(varlist,value) Fraction of cases less than the specified value. Default formats<br />

are F5.3.

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

Saved successfully!

Ooh no, something went wrong!