The HPSUMMARY Procedure

Computational Resources

The total of unique classification values that PROC HPSUMMARY allows depends on the amount of computer memory that is available. PROC HPSUMMARY uses the same memory allocation scheme across all operating environments. When classification variables are involved, PROC HPSUMMARY must keep a copy of each unique value of each classification variable in memory. You can estimate the memory requirements to group the classification variable by calculating

\[ N c_1(L c_1 + K ) + N c_2(L c_2 + K ) + \ldots + N c_ n (L c_ n + K ) \]

where $N c_ i$ is the number of unique values for the classification variable, $L c_ i$ is the combined unformatted and formatted length of $c_ i$, and K is some constant on the order of 32 bytes (64 for 64-bit architectures). When you use the GROUPINTERNAL option in the CLASS statement, $L c_ i$ is simply the unformatted length of $c_ i$.

The GROUPINTERNAL option can improve computer performance because the grouping process is based on the internal values of the classification variables. If a numeric classification variable is not assigned a format and you do not specify GROUPINTERNAL, then PROC HPSUMMARY uses the default format, BEST12., to format numeric values as character strings. Then PROC HPSUMMARY groups these numeric variables by their character values, which takes additional time and computer memory.

Each unique combination of classification variables $c_{1_ i}$ $c_{2_ j}$ for a given type forms a level in that type. See the section TYPES Statement. You can estimate the maximum potential space requirements for all levels of a given type, when all combinations actually exist in the data (a complete type), by calculating

\[ W *N c_1 *N c_2 * \ldots *N c_ n \]

where W is a constant based on the number of variables analyzed and the number of statistics calculated (unless you request QMETHOD= OS to compute the quantiles) and $N c_1 \ldots N c_ n$ are the number of unique levels for the active classification variables of the given type.

Clearly, the memory requirements of the levels overwhelm the levels of the classification variables. For information about how to adjust your computation resource parameters, see the SAS documentation for your operating environment.

Another way to enhance performance is by carefully applying the TYPES or WAYS statement, limiting the computations to only those combinations of classification variables that you are interested in.