More often than not, we encounter a problem where an OLS over a rolling time window is required, see , , , , , , , for a few examples.
One solution is to resort to SAS MACRO, but it is extremely inefficient and can't handle lar...
Read more »
More often than not, we encounter a problem where an OLS over a rolling time window is required, see , , , , , , , for a few examples.
One solution is to resort to SAS MACRO, but it is extremely inefficient and can't handle lar...
Read more »
Demo SAS implementation of Regularized (Linear) Discriminate Analysis of J. Friedman (1989). Simpler introduction can be found at . Regularized QDA follows similarly.
To save coding, I called R within SAS to finish the computation. For details...
Read more »
SAS Enterprise Miner (EM) is indeed a fancy tool for a SAS programmer who wants to switch to the field of data mining. It is like the point-and-click camera: you drag several nodes onto the diagram, run it and everything is settled. And I was quite i...
Read more »
Introduction: Merging two or multiple datasets is essential for many ‘data people’. Yes, it is a dirty and routine job. Everyone wants to get it done quick and accurate. Actually, SAS has many ways to tackle this job. In two competing papers fro...
Read more »
*Create a temporary dataset... DSN;data dsn;a=1;b=2;c=3;d=4;e=5;f=6;run;%macro test(lib,dsn);*/1)*/ data _null_;      set sashelp.vtable(where=(libname="&LIB" and memname="&DSN"));      call symput('nvars',nvar);run;*/2)*/ data ...
Read more »
Situation:The purpose of this research was to (1) to explore a recent multi-study approach (Arends, et al. 2008) in combining observational survival data instead of traditional meta-analysis, and (2) to develop multivariate random-effects models with o...
Read more »
One guy asked in a SAS forum about a typical table look up problem:
He has a data with two IDs:
id1 id2
a b
a e
b c
b e
c e
d e
and he wants to generate a new data set with the following structure according to above...
Read more »
In most table lookup tasks, we are doing EXACT matching. However, sometimes we are looking for closest match in the lookup table. By 'closest', we mean smallest Eucleadian distance:
||X-Y||2
Typically we have to manually code the search function ...
Read more »