Shared Concepts and Topics

Using CAS Tables

SAS/STAT procedures can be used on both SAS data sets and SAS Cloud Analytic Services (CAS) tables. In general, you can input a CAS table when option syntax calls for a SAS-data-set. The most common usage is that of the DATA=SAS-data-set option, in which you can specify either a SAS data set or a CAS table. In general, when the order of observations does not play a role in a statistical analysis, the results from inputting a CAS table match what you would get from the same data stored as a SAS data set.

However, CAS tables and SAS data sets are not always interchangeable. Traditionally, SAS/STAT procedures have been developed for use with SAS data sets, which can be thought of as a collection of observations arranged as ordered rows of data. But a CAS table has no intrinsic order of observations. When you use a CAS table as an input data set, the order of the observations as received by a SAS/STAT procedure is dynamically determined by various computational factors and can be different each time those data are retrieved.

Broadly speaking, the lack of intrinsic order of CAS tables can affect all statistical operations that use finite-precision arithmetic. Although most of the time such a numerical precision issue is minor and unnoticeable, there could be statistical methods and algorithms that cannot produce the intended or even correct statistical results unless the observations are ordered in a particular way or the data-ordering information is provided.

Table 9 summarizes various known issues in using CAS tables as input for SAS/STAT procedures. These issues are described in more detail in the next few sections, which are followed by an important section that recommends best practices for using CAS tables with SAS/STAT procedures.

Table 9: Primary Issues in Using CAS Tables with SAS/STAT Procedures

Issue Procedure’s Behavior
A procedure is incompatible with input CAS tables Exits with an error message
An option is incompatible with input CAS tables Exits with an error message or ignores the option and issues a warning message
A special data set is incompatible with CAS tables Exits with an error message
Special requirements for processing a CAS table properly are not satisfied Exits with an error message
Some statistical results are not reliably reproducible using input CAS tables Issues a note to the log or suppresses the affected results
Observations might not be identified reliably with input CAS tables Issues a note or warning to the log


Last updated: December 09, 2022