Means and UNIANOVA providing different Ns, Means
I am using the UNIANOVA procedure (Analyze->General Linear Model->Univariate) in SPSS Statistics to run an analysis of covariance (ANCOVA). I included "Descriptive statistics" in my list of options. My dependent variable is called SCORE and my factors are GROUP and CONDITION. My single covariate is called APTITUDE. I also ran the MEANS procedure (Analyze->Compare Means->Means) to get a wider array of descriptive statistics for SCORE in each of the cells of my design. However, the cell means from the two procedures do not agree and the cell counts, i.e., number of cases, in some cells are larger in the MEANS output than in the UNIANOVA output. Why do these procedures disagree on basic statistics for some of the cells?
If you have fractional weights (i.e., noninteger weight values) assigned by the WEIGHT command (Data->Weight Cases), then it is important to know that that MEANS does not round such weights when calculating descriptive statistics but UNIANOVA rounds the weights at the case level. See Technote 1592441 for more details on how these procedures handle fractional weights.
In the absence of fractional weights, there are likely missing values on the covariate (APTITUDE in your example). Cases with missing values on the covariate would not be omitted from the MEANS analysis, as the covariate is not mentioned there. However, cases that have missing values on the covariate would be omitted from the UNIANOVA analysis.
To see the full set of descriptive statistics that are available in the MEANS procedure, but using only those cases that will be used in the ANCOVA analysis in UNIANOVA, you can create a filter to use cases that are not missing on the covariate. If you are using the menu system, open the Data menu and choose "Select Cases". In the "Select Cases" dialog, click the radio button beside "If condition is satisfied" and click the "If" button below that choice. In the "Select Cases:IF" dialog that opens, enter in expression that conveys not having a missing value on the covariate, such as
If you are using syntax commands, you can either create and apply a filter variable, as in:
compute valcov = ~missing(aptitude).
filter by valcov.
or you can place a temporary selection before the MEANS command, as in:
select if ~missing(aptitude).
MEANS TABLES=score BY group BY condition
/CELLS MEAN COUNT STDDEV MEDIAN MIN MAX VAR.
If you already had an existing filter condition in place, such as "age<12", you would want to incorporate that into the new filter, as in "~missing(aptitude) & age < 12" (but without the quotation marks).