Deciphering the TYPE Variable in MEANS and SUMMARY Output Data Sets

From sasCommunity
Jump to: navigation, search

Abstract

Output data sets generated using the procedures MEANS and SUMMARY automatically contain the variable _TYPE_. This variable can prove to be very valuable when creating or working with subsets of the summary data set, but knowing what values of _TYPE_ to select for is difficult if you do not know how its values are assigned.

Fortunately the values assigned to _TYPE_ depend on the presence of the CLASS statement and the number and order of the variables that it contains. Understanding the relationship between the CLASS statement and _TYPE_ will allow you to accurately predict the value of _TYPE_ that will be associated with a particular combination of variables in the CLASS statement. This value can then be used to select data subsets based on this relationship.

As it turns out this relationship is fairly simple to understand and this paper will show you how to determine the resulting value of _TYPE_ based on any given combination of CLASS variables.


Online Materials

View the pdf for the paper here.


Contact Info

Please check out my user page. You can also email me.