FACPRODUCT procedure
Forms a factor with a level for every combination of other factors (R.W. Payne).
Options
Parameters
Description
This procedure allows a factor to be formed whose levels represent all the combinations of a list of other factors. This may be useful, for example, if a design is generated by regarding a set of the treatments as though they were the factorial combinations of a list of factors in order to confound some of the contrasts, say, with blocks. It may then be very much easier to set up the levels of the factors in the list rather than those of the full treatment factor (which can then be formed by this procedure). Similarly, as shown in the example, it can be used to put the values in a multi-way table back into a variate, inserting the value in each cell of the table into the units with that level of the classifying factors.
The FACTORS parameter gives the list of factors from which the new factor is to be formed. These factors can be input in either a pointer or a model formula. The PRODUCT parameter specifies the identifier of the new factor. By default, FACPRODUCT will define labels for the new factor, unless it has already been defined with the correct number of levels. However, you can set option FLABELS to always to insist that labels are formed, or never to ensure that they are not formed. (By default FLABELS=ifredeclared.) The labels are constructed by listing the levels (or labels, if available) of the original factors. The SEPARATOR option specifies the string to use to separate each level/label from the next.
By default the PRODUCT factor has levels defined only for the combinations of levels of the factors that actually occur in the data. However, you can set option LMETHOD=all to request that there is a level for every combination.
Options: FLABELS, SEPARATOR, LMETHOD. Parameters: FACTORS, PRODUCT.
Method
The FCLASSIFICATION directive is used, if necessary, to form lists of factors whose product is to be calculated. The levels for the factor are calculated according to the formula
level = 1 + ∑i=1...p { (mi - 1) × ni+1 × ... × np }
where p is the number of factors in the list, mi is the ordinal level of factor i,
and ni is the number of levels of factor i (the ordinal levels for factor i are the numbers 1...ni). If LMETHOD=present, the levels are then renumbered to omit any that do not occur in the data.
Action with
RESTRICT
If any of the factors is restricted, the levels will be formed only for the units not excluded by the restriction.