Category: SAS

Randomly Generating a Truncated Normal Distribution

A brief foray into the actual nitty-gritty aspects of research, especially the part that seems to dominate the time of a graduate student in Epidemiology: coding. Particularly, the code for generating random numbers from a truncated normal distribution in SAS 9.2. Generating numbers from a regular normal distribution is easy as pie: x=rannor(seed), where x […]

What can I use SAS for?

According to my site stats someone found this site yesterday by searching for the phrase “what can i use sas for?’ I’m flattered. And I hope they found the answer to their question. Though to be honest, I doubt that anything I have previously written addressed the use of SAS in such broad terms. So […]

What’s my line? (CSEdWeek edition)

Author note: I’m “replaying” this post in honor of Computer Science Education Week. It originally appeared here over 3 years ago.

Today was “career day” in my daughter’s 3rd grade classroom. A few privileged parents were invited to attend and …

NOTE: The SAS Professionals Advent Calendar Starts Today!

If you like a bit of festive fun (and who doesn’t) I suggest you hop over to the SAS Professionals web site and open the first door of the advent calendar.

The SAS Professionals web site also contains a broad mix of groups and activities, forums and S…

SAS EG 4.1 RIP

SAS Enterprise Guide software has a built-in expiration date, which is generally five to six years after it has been released.  SAS EG 4.1 expired today.  RIP, my friend.
But wait?!?  What’s this?  Can it be?  You’re alive! &nbsp…

Why I like Mainframe SAS

I was horrified by Mainframe SAS first time when I saw it. I struggled many times to let SAS output ‘Hello World’ to the log and failed, and then I started to sweat. Finally my colleague came to rescue me by teaching me to how to insert JCL before …

Harizontal High-Low Plot

/* Set graphics options */goptions reset=all cback=white border;/* Set system options */data a;input TEST $8. BREAKS;cards;Cold 5Cold 12Cold 14Cold 22Cold 52Heat 20Heat 25Heat 10Heat 22Heat 47Gases 12Gases …

Use DO WHILE to read in every word in a string

%local cnt tword ntot1;%let cnt=1;%let tword=%qscan(&tstring,&cnt,%str( ));%* let ntot1=%qscan(&tcount,&cnt,%str( ));%do %while(&tword ne);&nbsp &nbsp &nbsp data _null_;&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp set &dir..&dsn;&nbsp &nbsp &nbsp &nbsp &nbsp &n…