## Contrasted with Other SAS Procedures

The NESTED procedure performs a computationally efficient
analysis of variance for
data with a nested design, estimating the different components of variance
and also testing for their significance if the design is
balanced (see the "Unbalanced Data" section).
Although other procedures (such as GLM and MIXED) provide
similar analyses, PROC NESTED is both easier to use and
computationally more efficient for this special type of design.
This is especially true when the design involves a
large number of factors, levels, or observations.

For example, to specify a four-factor completely nested
design in the GLM procedure, you use the form

class a b c d;
model y=a b(a) c(a b) d(a b c);

However, to specify the same design
in PROC NESTED, you simply use the form
class a b c d;
var y;

In addition, other procedures require TEST
statements to perform appropriate tests,
whereas the NESTED procedure produces the appropriate tests
automatically.
However,

PROC NESTED makes one assumption about
the input data that the other procedures do not:
**PROC NESTED assumes that the input data set is sorted by
the classification (CLASS) variables defining the effects.**
If you use PROC NESTED on data that is not sorted by the CLASS
variables, then the results may not be valid.

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.