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.

98 AGGREGATE<br />

• User-missing values are treated as valid when these four functions are followed by a period<br />

and have a variable as an argument. NMISS.(AGE) treats user-missing values as valid and<br />

thus gives the number of cases for which AGE has the system-missing value only.<br />

The effect of specifying a period with N, NU, NMISS, and NUMISS is illustrated by the following:<br />

N = N. = N(AGE) + NMISS(AGE) = N.(AGE) + NMISS.(AGE)<br />

NU = NU. = NU(AGE) + NUMISS(AGE) =<br />

NU.(AGE) + NUMISS.(AGE)<br />

• The function N (the same as N. with no argument) yields a value for each break group that<br />

equals the number of cases with valid values (N(AGE)) plus the number of cases with useror<br />

system-missing values (NMISS(AGE)).<br />

• This in turn equals the number of cases with either valid or user-missing values (N.(AGE))<br />

plus the number with system-missing values (NMISS.(AGE)).<br />

• The same identities hold for the NU, NMISS, and NUMISS functions.<br />

Example<br />

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

/AVGSAL = MEAN(SALARY).<br />

• AVGSAL is missing for an aggregated case if SALARY is missing for any case in the break<br />

group.<br />

Example<br />

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

/LOVAC = PLT.(VACDAY,10).<br />

• LOVAC is the percentage of cases within each break group with values less than 10 for<br />

VACDAY, even if some of those values are defined as user-missing.<br />

Example<br />

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

/FIRSTAGE = FIRST.(AGE).<br />

• The first value of AGE in each break group is assigned to the variable FIRSTAGE.<br />

• If the first value of AGE in a break group is user missing, that value will be assigned to<br />

FIRSTAGE. However, the value will retain its missing-value status, since variables created<br />

with FIRST take dictionary information from their source variables.<br />

Comparing Missing-Value Treatments<br />

Table 1 demonstrates the effects of specifying the MISSING subcommand and a period after<br />

the function name. Each entry in the table is the number of cases used to compute the<br />

specified function for the variable EDUC, which has 10 nonmissing cases, 5 user-missing<br />

cases, and 2 system-missing cases for the group. Note that columnwise treatment produces<br />

the same results as the default for every function except the MEAN function.

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

Saved successfully!

Ooh no, something went wrong!