Example of Two Indices for Variables to Cases

When a variable group records more than one factor, you can create more than one index; however, the current data must be arranged so that the levels of the first factor are a primary index within which the levels of subsequent factors cycle. In the current data, there is one variable group, width, and two factors, A and B. The data are arranged so that levels of factor B cycle within levels of factor A.

Table 1. Current data for two indices
subject w_a1b1 w_a1b2 w_a2b1 w_a2b2
1 5.5 6.4 5.8 5.9
2 7.4 7.1 5.6 6.7

We'll restructure the variable group into a single variable, width, and create two indices. The new data are shown in the following table.

Table 2. New, restructured data with two indices
subject index_a index_b width
1 1 1 5.5
1 1 2 6.4
1 2 1 5.8
1 2 2 5.9
2 1 1 7.4
2 1 2 7.1
2 2 1 5.6
2 2 2 6.7