From A Logicl Point of View

Hello World by a SAS Programer

SAS MapReduce: A Quick Followup by DS2

2015-09-04 posted in [SAS]

(

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 / overwrite = yes;
dcl double d;
method init();
   dcl int i;
   do i = 1 to 10000000;
      /*– create some money values –*/
      d = round( (ranuni(123) * 10 ), .01 );
      output;
   end;
end;
enddata;
run;
/*– count the rows in multiple threads –*/
thread map / overwrite = yes;
dcl double c s;
keep c s;
method run();
   set input_data;
   /*– the more compuation here, the more benefit –*/
   c + 1;
   s + d;
end;
method term();
   output;
   put s= c=;
end;
endthread;
run;
/*– blend the results into one total –*/
data reduce / overwrite = yes;
dcl thread map m;
dcl double totc tots;
keep totc tots;
method run();
   set from m threads=4;
   totc + c;
   tots + s;
end;
method term();
   output;
end;
enddata;
run;
quit;
proc print data=reduce; run;
Notice the option of “threads=4”. You can specify the thread as any number you want (the number of slaves..). Thanks

Robert Ray of SAS Institute to kindly allow me to post his code.

A Quick Look at SAS DS2 Merge

2015-09-04 posted in []

The code:

SAS Combinatorial Functions: Snippets

2015-06-25 posted in []

1. Permutation and Combination

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

2015-05-22 posted in []

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.

Calculating Covariance by SAS, A Brutal Way

2015-05-12 posted in []

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):

Import .Rdata to SAS, along with Labels

2015-05-12 posted in []

I didn’t play with SAS/IML for a while. I call it back when I need to read some R format data.

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

2015-05-05 posted in []

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.

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

2015-03-09 posted in []

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:

Takeaway Materials From PharmaSUG SDE, Cary, NC

2014-09-29 posted in []

It’s the first PharmaSUG event I ever attended and it’s great and I plan to submit a paper for PharmaSUG 2015.

To Exit or Not Exit, the SAS Ways

2014-09-11 posted in []

Order Matters: A Weird Behavior of SAS ODS Style Options

2014-09-04 posted in []

Support the Blog Author to Bike MS

2014-08-11 posted in []

A Minimal Set of Resource for SAS Programmers

2014-06-20 posted in []

Best Opportunity Ever For SAS Learning: Free Software, Free Online Courses

2014-06-19 posted in []

Free Clinical Trial Data (with Protocols and CRFs!)

2014-05-13 posted in []

Use List Object in SAS: Yet Another Undocumented Feature in SAS 9.4

2014-04-01 posted in []

Record Qualifier v.s. Variable Qualifier

2014-03-18 posted in []

A SAS Note for Length Limit of Strings in CDISC Datasets

2014-02-18 posted in []

SAS Format Viewer and Others (EG)

2014-02-06 posted in []

SAS Proc Groovy in Action: JSON File Processing

2013-12-12 posted in []

The Hardware and Software 2013 I’m Most Thankful For

2013-11-29 posted in []

SAS Data Driven Programming: My 4 Favorite Techniques

2013-11-07 posted in []

3 Ways to Convert SAS Datasets to Plain Codes

2013-11-04 posted in []

Community Contributors to SAS/STAT

2013-09-18 posted in []

SAS ODS Tagsets Guru Eric Gebhart on Github

2013-09-17 posted in []

How I Use SAS?

2013-09-16 posted in []

SAS System Viewer Doesn’t support SAS 9.4 Datasets

2013-08-27 posted in []

Noninferiority Testing with SAS

2013-08-26 posted in []

Confidence Intervals for Difference Between Independent Binomial Proportions: A SAS 9.4/STAT 12.3 Update

2013-08-25 posted in []

Everything You Need to Know about Your SAS Session and No More…

2013-08-25 posted in []

Confidence Intervals for Binomial Proportion: A SAS 9.4/STAT 12.3 Update

2013-08-22 posted in []

Yet Another Instance of DoW-Loop

2013-08-07 posted in []

Good Morning, Hotfix Tool for SAS 9.4

2013-07-29 posted in []

Open Box: SAS 9.4 in Windows 7

2013-07-28 posted in []

List Processing With SAS (2): List Creating II

2013-07-26 posted in []

The Return of SAS System Viewer

2013-07-16 posted in []

List Processing With SAS (1): List Creating I

2013-07-11 posted in []

Catch Up with SAS

2013-07-11 posted in []

Free Utilities to Zip Files in Windows: Quick Notes

2013-06-29 posted in []

Preproduction in SAS

2013-06-29 posted in []

List Processing With SAS: A Github Repository

2013-03-31 posted in []

Localize Your Macro Variable? Mostly Not Needed or Do It If You Only Want to Initiate It

2013-03-29 posted in []

What’s New

2013-03-20 posted in []

New Game in Town: SAS Metadata Administration

2013-03-13 posted in []

SAS Snippet: Reshape Data Using SAS DoW Loop (From Long to Wide)

2013-03-11 posted in []

Yet Another Undocumented Feature (new in SAS 9.3)

2013-02-26 posted in []

How to Write a Check? Use SAS Format!

2013-02-24 posted in []

Github for Clinical/Statistical Programmers

2013-02-20 posted in []

Linguistic Sorting in SAS Proc Sort

2013-02-19 posted in []

SAS ODS Report Writing Interface: A Quick Demo

2013-02-17 posted in []

LearningR!

2013-02-08 posted in []

How to Jump into SAS Data Integration Studio

2013-01-12 posted in []

How to Get Row Numbers in SAS Proc SQL (and DO NOT Use the Undocumented MONOTONIC Function)

2013-01-11 posted in []

Get Started with SAS Tagsets.ExcelXP

2013-01-05 posted in []

Blog Statistics: 2012

2013-01-01 posted in []

Best of SAS: A Personal Nomination 2012

2012-12-31 posted in []

The Great, Open, Vendor-neutral, Platform-independent Data Standards, . . . Yet in PDF Formats

2012-12-29 posted in []

Weekend Clips: Data Scientist Episode II

2012-12-23 posted in []

SAS Certified, Again

2012-12-22 posted in []

My SAS Books: Shopping List 2012

2012-12-07 posted in []

Weekend Clip: Data Scientist

2012-11-30 posted in []

Extract the Version of SAS and OS of a SAS Format or Macro Catalog: A Little Bit of Perl Regular Expression

2012-11-25 posted in []

WordPress and Black Friday

2012-11-23 posted in []

Macro Quoting in SAS Data Integration Studio

2012-11-19 posted in []

A SAS 9.3 Macro Trick: %put &=var

2012-11-08 posted in []

Hello Groovy in SAS 9.3

2012-10-28 posted in []

Tony Barr and the Early History of SAS

2012-10-23 posted in []

DoW-Loop: A Quick Note from SESUG 2012

2012-10-20 posted in []

Be Your Own SAS Admin: Create Customized SAS Sessions

2012-10-18 posted in []

Incorporate SAS/IML to Base SAS?

2012-10-16 posted in []

SAS Perl Regular Expression (PRX) Talk in the forthcoming SESUG 2012

2012-10-11 posted in []

Powershell: Up to v3.0

2012-10-08 posted in []

Current Working Folder in SAS

2012-10-08 posted in []

Two SAS AF Utilities: LogFilter and Format Viewer

2012-10-02 posted in []

Set Up R (for SAS Programmers)

2012-09-30 posted in []

Statistical Notes (5): Confidence Intervals for Difference Between Independent Binomial Proportions Using SAS

2012-09-23 posted in []

Where is SAS Output Anyway?

2012-09-22 posted in []

New Book on Confidence Intervals for Proportions by Prof. Newcombe

2012-09-21 posted in []

Frequentist or Baysian in A Binomial Test

2012-09-21 posted in []

Statistical Notes (4): Dragon’s Teeth and Fleas: Hypothesis Testing in Plain English

2012-09-16 posted in []

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

2012-09-15 posted in []

Statistical Notes (2): Equivalence Testing and TOST (Two One-Sided Test)

2012-09-12 posted in []

Statistical Notes (1): Geometric Mean and Geometric Mean Ratio

2012-09-12 posted in []

Is There Any Better Way? Publishing Process For CDISC Standards Documentation

2012-07-19 posted in []

Tab is a Tab is a Tab is a Tab

2012-07-14 posted in []

Sublime Text 2 for SAS Programmers: A Quick Note

2012-07-13 posted in []

Blogging is Awesome: CDISC Bloggers

2012-05-04 posted in []

Digital Life and Personal Data Analysis

2012-04-04 posted in []

OpenCDISC Validator V1.3: An Unboxing Review (1): counting issue

2012-03-31 posted in []

Fetch CDISC Control Terminology Files in NCI Vocabulary Repository: All in One Click

2012-03-30 posted in []

Quick Notes on RTP CDISC User’s Group Q1 Meeting

2012-03-28 posted in []

US Post Beats Menu Cost

2012-03-24 posted in []

Not Documented, Not Exist?!

2012-02-29 posted in []

Happy Leap Year From Logical (Point of View) Operators

2012-02-29 posted in []

GitHub and Weekend Programming

2012-02-19 posted in []

Column Mode in SAS 9.3 Enhanced Editor

2012-02-12 posted in []

Face Off: Review OpenCDISC XML files

2012-02-11 posted in []

Happy New Year (Yes Again)

2012-01-24 posted in []

Vim as A SAS IDE

2011-11-13 posted in []

My Collection of SAS Macro Repositories

2011-11-08 posted in []

Get Start with WPS, and Call for an Elegant SAS IDE!

2011-11-05 posted in []

Hello Python

2011-10-31 posted in []

An Online Latin to English Translator via SAS

2011-10-08 posted in []

Map and Reduce in MapReduce: a SAS Illustration

2011-10-04 posted in []

An Analytical Valley: Big Data and Data Scientists (and SAS Programmers)

2011-09-14 posted in []

Fours Errors in SAS 9.2 Fisher’s Iris Data in SASHELP Library

2011-09-03 posted in []

Who is Alfred?

2011-08-31 posted in []

I am a 20% SAS Nerd!

2011-08-23 posted in []

SAS Bloggers in Action (2): Jian Dai and his SAS Academy

2011-08-15 posted in []

Retrieve blogs using SAS

2011-07-20 posted in []

SAS Bloggers In Action(1): Rick Wicklin, SAS/IML and “Color Revolution”

2011-07-17 posted in []

Tango Haiku

2011-07-15 posted in []

A SAS Implementation of Confidence Intervals for Single Proportion: Eleven Methods

2011-07-14 posted in []

Dive into CDISC Express (5): Generate and Validate SDTM domains and define.xml

2011-07-07 posted in []

Dive into CDISC Express (4): Data manipulation techniques

2011-07-04 posted in []

Dive into CDISC Express (3): Navigate mapping file

2011-07-03 posted in []

Dive into CDISC Express (2): Create a New Study

2011-07-02 posted in []

ADJECTIVE Encounters

2011-07-02 posted in []

Dive into CDISC Express (1): Introductory

2011-06-28 posted in []

SAS Global Forum 2011: Personal Notes

2011-06-04 posted in []

CDISC Express: A Glance

2011-05-16 posted in []

Sail for Las Vegas!

2011-03-19 posted in []

Too Big to Be Accurate(1): Which is the Most Powerful Calculator in the World?

2011-01-22 posted in []

Feature Selection: Collections for Self Study

2011-01-15 posted in []

Decision Trees in SAS Enterprise Miner and SPSS Clementine

2011-01-04 posted in []

SAS Data Step’s Built-in Loop: An illustrated Example

2011-01-03 posted in []

SGF: Caesars Palace in Las Vegas again

2010-12-30 posted in []

A SAS Programmer’s End Year Haiku

2010-12-30 posted in []

Blogging SAS

2010-11-30 posted in []

Recursion: Biblical Evidences

2010-11-06 posted in []

Power of Logic Operators: a trick

2010-11-04 posted in []

Recursive Referencing and Binomial Proportion Interval

2010-11-03 posted in []

Play Matrix within SAS(1): basic files processing

2010-10-29 posted in []

SAS Algorithmically(1): Newton-Raphson method

2010-10-21 posted in []

Happy SAS Graphing!

2010-10-17 posted in []

Logics in mathematics and in daily life: a statistical programming example

2010-10-08 posted in []

XML and SAS

2010-10-07 posted in []

On three statistical realms

2010-10-06 posted in []

From A Logical Point of View

2009-12-21 posted in []

Work With Oracle: A Quick Sheet for SAS Programmers

2009-12-04 posted in []

Run data mining codes following William Potts

2009-03-20 posted in []

Free Machine Learning Courses (Stanford) in YouTube

2009-03-02 posted in []

SAS User Books and Data Mining Software Comparision: Quick Links

2009-02-17 posted in []

Basel II on Incremental Risk Charge(IRC): Quick Links

2009-02-12 posted in []

FYI: Dashboard using SAS/Graph

2009-01-13 posted in []

R or SAS: Quick Links to the Recent Debates

2009-01-13 posted in []

Options Pricing Using SAS

2009-01-06 posted in []

Happy New Year

2009-01-01 posted in []

Links: Risk Intelligence Vendors Review: 2008

2008-12-25 posted in []

Links–BI Industry 2008: Review and Prospect

2008-12-24 posted in []

Industry Review: SAS and Teradata Partnership

2008-12-19 posted in []

Santa and SAS Again: Santa’s Dashboard

2008-12-18 posted in []

The Making of an Analyst: A Supplement to What Makes a Good Business Analyst

2008-12-17 posted in []

Learn Time Series Analysis: Free Materials for SAS Users

2008-12-16 posted in []

Links of 2008-12-16: Financial Engineering, Ponzi Scheme, SAS PC Game

2008-12-16 posted in []

Delivers the Right Toys and Goodies to the Right Boys and Girls: Story of Santa and SAS

2008-12-14 posted in []

If You Can Make it Here, You Can Make it Anywhere: On What Makes a Good Business Analyst by Rajan Chandras

2008-12-14 posted in []

Data Mining in Stock Market

2008-12-13 posted in []

Haiku from SAS R&D staff

2008-12-10 posted in []

Happy grow up

2008-12-10 posted in []