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.

Example<br />

AGGREGATE 97<br />

AGGREGATE OUTFILE=* /BREAK=DEPT<br />

/LOWVAC,LOWSICK = PLT (VACDAY SICKDAY,10).<br />

• AGGREGATE creates two aggregated variables: LOWVAC and LOWSICK. LOWVAC is the<br />

percentage of cases with values less than 10 for VACDAY and LOWSICK is the percentage<br />

of cases with values less than 10 for SICKDAY.<br />

Example<br />

AGGREGATE OUTFILE=GROUPS /BREAK=OCCGROUP<br />

/COLLEGE = FIN(EDUC,13,16).<br />

• AGGREGATE creates the variable COLLEGE, which is the fraction of cases with 13 to 16<br />

years of education (variable EDUC).<br />

Example<br />

AGGREGATE OUTFILE=* /BREAK=CLASS<br />

/LOCAL = PIN(STATE,’IL’,’IO’).<br />

• AGGREGATE creates the variable LOCAL, which is the percentage of cases in each break<br />

group whose two-letter state code represents Illinois, Indiana, or Iowa. (The abbreviation<br />

for Indiana, IN, is between IL and IO in an alphabetical sort sequence.)<br />

MISSING Subcommand<br />

By default, AGGREGATE uses all nonmissing values of the source variable to calculate<br />

aggregated variables. An aggregated variable will have a missing value only if the source<br />

variable is missing for every case in the break group. You can alter the default missing-value<br />

treatment by using the MISSING subcommand. You can also specify the inclusion of usermissing<br />

values on any function.<br />

• MISSING must immediately follow OUTFILE.<br />

• COLUMNWISE is the only specification available for MISSING.<br />

• If COLUMNWISE is specified, the value of an aggregated variable is missing for a break<br />

group if the source variable is missing for any case in the group.<br />

• COLUMNWISE does not affect the calculation of the N, NU, NMISS, or NUMISS functions.<br />

• COLUMNWISE does not apply to break variables. If a break variable has a missing value,<br />

cases in that group are processed and the break variable is saved in the file with the<br />

missing value. Use SELECT IF if you want to eliminate cases with missing values for the<br />

break variables.<br />

Including Missing Values<br />

You can force a function to include user-missing values in its calculations by specifying a<br />

period after the function name.<br />

• AGGREGATE ignores periods used with functions N, NU, NMISS, and NUMISS if these<br />

functions have no argument.

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

Saved successfully!

Ooh no, something went wrong!