Example of One Index for Variables to Cases
In the current data, there is one variable group, width, and one factor, time. Width was measured three times and recorded in w1, w2, and w3.
We'll restructure the variable group into a single variable, width, and create a single numeric index. The new data are shown in the following table.
Index starts with 1 and increments for each variable in the group. It restarts each time a new row is encountered in the original file. We can now use index in procedures that require a grouping variable.