The ORDER= Option


The PROC FREQ statement has an option that defines the order in which values appear in frequencies and crosstabs generated by PROC FREQ. The default is ORDER=INTERNAL, which means that data is ordered (alphabetically or numerically) by the unformatted values of the data. For example, the ARM variable in the above example takes on a value of 'ASA' or 'GG' and thus by default the ASA values will appear before the GG values in the PROC FREQ output. The impact of other ORDER= options are given in the table below.

 

Which should you use? In general, it's worth arranging the PROC FREQ output so that the outcome of interest appears in the first column and the target group appears in the first row. In the example above, the output table should be arranged so that ARM = 'GG' is in the first row and ANYv34=1 is in the first column.