Nested Effects

Nested effects are generated in the same manner as crossed effects. Hence, the design columns generated by the following two statements are the same (but the ordering of the columns is different):

model Y=A B(A);

model Y=A A*B;

The nesting operator in SAS/STAT software is more of a notational convenience than an operation distinct from crossing. Nested effects are typically characterized by the property that the nested variables never appear as main effects. The order of the variables within nesting parentheses is made to correspond to the order of these variables in the CLASS statement. The order of the columns is such that variables outside the parentheses index faster than those inside the parentheses, and the rightmost nested variables index faster than the leftmost variables (Table 19.6).

Table 19.6 Example of Nested Effects

Data

 

I

 

A

 

B(A)

A

B

 

 

A1

A2

 

B1A1

B2A1

B3A1

B1A2

B2A2

B3A2

1

1

 

1

 

1

0

 

1

0

0

0

0

0

1

2

 

1

 

1

0

 

0

1

0

0

0

0

1

3

 

1

 

1

0

 

0

0

1

0

0

0

2

1

 

1

 

0

1

 

0

0

0

1

0

0

2

2

 

1

 

0

1

 

0

0

0

0

1

0

2

3

 

1

 

0

1

 

0

0

0

0

0

1