Ascending and decending

In programming, sorting can occur in ascending way or ascending way. I often get confused by this distinction when  I use SAS PROC SORT.   To summarize:

Sorting by ascending order means:
1
2
3
4
5

Sorting by descending order means:
5
4
3
2
1

PROC SORT:

The following is an example of how descending can be specified. The first SORT procedure sorts the data by first DateModified by natural sequence and TimeModified by the descending order. This means that older data (defined by TimeModified) in the presence of duplicate rows (the same date) will appear first. The second SORT procedure has the nodupkey option, which means that only the first and thus oldest data will be kept and the rest are deleted if the data came from the same date.

proc sort;by Table1_ID child_number DateModified descending TimeModified;
run;
proc sort nodupkey;by Table1_ID child_number;
run;

 

PROC LOGISTIC

It is common to code the binary outcome as 0 (failure) and 1 (success); however, PROC LOGISTIC models the occurrence of 1 not 0.

<continued>

Leave a Reply