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

Create successful ePaper yourself

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

96 AGGREGATE<br />

FIN(varlist,value1,value2) Fraction of cases between value1 and value2, inclusive. Default<br />

formats are F5.3.<br />

FOUT(varlist,value1,value2) Fraction 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.3.<br />

N(varlist) Weighted number of cases in break group. Default formats are<br />

F7.0 for unweighted files and F8.2 for weighted files.<br />

NU(varlist) Unweighted number of cases in break group. Default formats<br />

are F7.0.<br />

NMISS(varlist) Weighted number of missing cases. Default formats are F7.0 for<br />

unweighted files and F8.2 for weighted files.<br />

NUMISS(varlist) Unweighted number of missing cases. Default formats are F7.0.<br />

FIRST(varlist) First nonmissing observed value in break group. Complete<br />

dictionary information is copied from the source variables to the<br />

target variables.<br />

LAST(varlist) Last nonmissing observed value in break group. Complete<br />

dictionary information is copied from the source variables to the<br />

target variables.<br />

• The functions SUM, MEAN, and SD can be applied only to numeric source variables. All<br />

other functions can use short and long string variables as well as numeric ones.<br />

• The N and NU functions do not require arguments. Without arguments, they return the number<br />

of weighted and unweighted valid cases in a break group. If you supply a variable list,<br />

they return the number of weighted and unweighted valid cases for the variables specified.<br />

• For several functions, the argument includes values as well as a source variable<br />

designation. Either blanks or commas can be used to separate the components of an<br />

argument list.<br />

• For PIN, POUT, FIN, and FOUT, the first value should be less than or equal to the second.<br />

If the first is greater, AGGREGATE automatically reverses them and prints a warning<br />

message. If the two values are equal, PIN and FIN calculate the percentages and fractions<br />

of values equal to the argument. POUT and FOUT calculate the percentages and fractions<br />

of values not equal to the argument.<br />

• String values specified in an argument should be enclosed in apostrophes. They are evaluated<br />

in alphabetical order.<br />

Example<br />

AGGREGATE OUTFILE=AGGEMP /BREAK=LOCATN<br />

/AVGSAL ’Average Salary’ AVGRAISE = MEAN(SALARY RAISE).<br />

• AGGREGATE defines two aggregate variables, AVGSAL and AVGRAISE.<br />

• AVGSAL is the mean of SALARY for each break group, and AVGRAISE is the mean of<br />

RAISE.<br />

• The label Average Salary is assigned to AVGSAL.

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

Saved successfully!

Ooh no, something went wrong!