Author Archive

SAS MapReduce: A Quick Followup by DS2

September 4, 2015
By

(DS2 would be the king!) Years ago I made up a piece of SAS code to demonstrate the basic idea of Map-Reduce. Now this idea can be best implemented by this piece of workable program with PROC DS2 (tested in SAS 9.4 TS1M2, Win7): PROC DS2; /* create some data –*/ data input_data /...
Read more »

Tags: , ,
Posted in SAS | Comments Off on SAS MapReduce: A Quick Followup by DS2

A Quick Look at SAS DS2 Merge

September 4, 2015
By
A Quick Look at SAS DS2 Merge

The code: data a;     input i a $ b $;     datalines;     1 a1A b1     1 a1A b1     2 a2 b2     ; run; data b;     input i a $ c $;     datalines;     1 a1C c1     2 .   c2     3 .  c3     ; run;...
Read more »

Tags: , ,
Posted in SAS | Comments Off on A Quick Look at SAS DS2 Merge

SAS Combinatorial Functions: Snippets

June 25, 2015
By

1. Permutation and Combination data _null_;     n = 5;     r = 2;    *the factorial of a number;    fact=fact(n);    *for positive integers, fact(n) = gamma(n+1);    gamm=gamma(n + 1);    *C(n,r): number of combinations of n objects selected r ;    *n! / ;    comb1 = comb(n,r);    comb2...
Read more »

Tags: , ,
Posted in SAS | Comments Off on SAS Combinatorial Functions: Snippets

Statistical Notes (3B): Confidence Intervals for Binomial Proportion Using SAS, Updated

May 23, 2015
By
Statistical Notes (3B): Confidence Intervals for Binomial Proportion Using SAS, Updated

This quick note serves as a supplementnote of my previous Statistical Notes (3): Confidence Intervals for Binomial Proportion Using SAS which I will extend as a SESUG 2015 paper. Basically I added a new Blaker method to my CI_Single_Proportion.sas file and found more CIs from SAS PROC FREQ. First of all, call the script:...
Read more »

Tags: , ,
Posted in SAS | Comments Off on Statistical Notes (3B): Confidence Intervals for Binomial Proportion Using SAS, Updated

Calculating Covariance by SAS, A Brutal Way

May 12, 2015
By
Calculating Covariance by SAS, A Brutal Way

It was very disappointed that there is only one built-in method to calculate covariance in Base SAS: that’s in PROC CORR (while you can also do it in SAS/IML, of course): The following is a quick-and-dirty way to get a function like %COV: %macro COV(data, var1,var2); %local _cov; %let rc = %sysfunc(dosubl(%str(     ods...
Read more »

Tags: ,
Posted in SAS | Comments Off on Calculating Covariance by SAS, A Brutal Way

Import .Rdata to SAS, along with Labels

May 12, 2015
By
Import .Rdata to SAS, along with Labels

I didn’t play with SAS/IML for a while. I call it back when I need to read some R format data. Technically, .Rdata is not a data format. It’s rather a big container to hold bunch of R objects: In this example, when a .Rdata is loaded, 3 objects are included where ‘data’(the ‘real’...
Read more »

Tags: , ,
Posted in SAS | Comments Off on Import .Rdata to SAS, along with Labels

Confidence Intervals for Binomial Proportion (Again): A Quick Note

May 5, 2015
By

In Lex’s library of the latest SAS Global Forum 2015 papers, I found an interesting paper by Wu Gong, Jeffreys Interval for One-Sample Proportion with SAS/STAT Software, where SAS MCMC procedure and a so called Random Walk Metropolis Algorithm were implemented to calculate the Jeffreys interval for binomial proportion. Years ago I wrote several...
Read more »

Tags: , ,
Posted in SAS | Comments Off on Confidence Intervals for Binomial Proportion (Again): A Quick Note

List Manipulations Made Easy (and little bit of UGLY): the New DOSUBL Function

March 9, 2015
By

Typically, SAS list manipulations needs bunch of SAS I/O functions which are not necessarily well known to all SAS programmers. The new DOSUBL function makes this technique much more easier and little bit of ugly I must admit: %MACRO ExpandVarList(data=_LAST_, var=_ALL_);     %if %upcase(%superq(data)) = _LAST_     %then %let data = &SYSLAST;     %let...
Read more »

Tags:
Posted in SAS | Comments Off on List Manipulations Made Easy (and little bit of UGLY): the New DOSUBL Function

Proc-x is looking for sponsors!

Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com



Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.