It's always encouraging to get feedback about my blog articles and/or see an article spark some conversation. Last week's Date Increments (INTNX and INTCK) featured the INTNX function for incrementing (or decrementing) date, time, and datetime values b...
Read more »
Tags: functions, SAS, syntax
Posted in SAS | Comments Off
Did you ever hear of PROC JLAUNCH? No, neither did I until I tried the FCmp Function Editor. And, if you didn't know, the FCmp Function Editor is an interactive tool for exploring and maintaining functions created with PROC FCMP. There are a lot of goo...
Read more »
Tags: functions, SAS
Posted in SAS | Comments Off
Here's just a brief post about a function I just stumbled across. The PROPCASE function coverts a string to "proper case" wherein the first letter of each word is upper case and all others are lower case. Clearly this is a very useful thing for column ...
Read more »
Tags: English language, functions, SAS, syntax
Posted in SAS | Comments Off
data _null_;      do i=0 to 255;            x=byte(i);            put i= x=;      end;      y=rank('a');      put y=;run;BYTE function results:i=65 -- 90 x=...
Read more »
Tags: functions, Tip
Posted in SAS | Comments Off
LAG Function (SAS 9.2 Doc)*** Use a third variable to assign the value from the previous record;array one a b c d;array two e f g h;      do over one;            temp = lag(one);            if...
Read more »
Tags: functions, Tip
Posted in SAS | Comments Off
options pageno=1 nodate ls=80 ps=64;data u1(keep=x);      seed = 104;      do i = 1 to 5;            call ranuni(seed, x);            output;      end;     ...
Read more »
Tags: Call Routine, functions, Tip
Posted in SAS | Comments Off
This is a special R-only entry.In Example 8.7, we showed the Hosmer and Lemeshow goodness-of-fit test. Today we demonstrate more advanced computational approaches for the test.If you write a function for your own use, it hardly matters what it looks l...
Read more »
Tags: functions, goodness of fit, Hosmer and Lemeshow, logistic regression
Posted in SAS | Comments Off
We can’t stress the importance handling character case correctly. Here are the two functions you need to know and use correctly. In order to convert all characters in a sting to lowercase, use the LOWCASE function. Example: data ds_2; set ds_1; *convert it to lowercase; new_char_var=lowcase(OLD_CHAR_VAR); run; In order to convert all characters in...
Read more »
Tags: AAG, AFHood Analytics Group, capitalize, character, character type, character variable, function, functions, lowcase, lower case, lowercase, names, propcase, proper case, SAS, SAS Code, string functions, upcase, upper case, uppercase
Posted in SAS | Comments Off