Posts Tagged ‘ SAS macro ’

Jedi SAS Tricks – Make This a Button in Base SAS

May 1, 2016
By

A recent post, Jedi SAS Tricks: The DATA to DATA Step Macro, engendered a lot of response on Twitter. One of the re-tweets included a call to action - make this a button in Base SAS! Well, Sam, I aim to please! Now, I'm not the guy who builds the SAS Windowing

The post Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Jedi SAS Tricks – Make This a Button in Base SAS

Jedi SAS Tricks: The DATA to DATA Step Macro

March 11, 2016
By

I was answering questions about SAS in a forum the other day, and it struck me how much easier it is to help folks if they can provide a snippet of data to go along with their program when asking others to help troubleshoot. This makes it easy to run

The post Read more »

Tags: , , , , ,
Posted in SAS | Comments Off on Jedi SAS Tricks: The DATA to DATA Step Macro

Example 2014.2: Block randomization

January 22, 2014
By

This week I had to block-randomize some units. This is ordinarily the sort of thing I would do in SAS, just because it would be faster for me. But I had already started work on the project R, using knitr/LaTeX to make a PDF, so it made sense to continue the work...
Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Example 2014.2: Block randomization

Importing CSV files into SAS datasets

September 18, 2013
By

Sometimes, your first impulse may not be correct, like trading in your practical sedan for a hot 2-seater.  Other times, your first impulse is perfect, as in the examples below. Suppose the automobile data you wish to analyze resides in a CSV file.  ...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on Importing CSV files into SAS datasets

Coding in the fast lane with data-driven macro calls

March 11, 2013
By

The simple PRINT macro below prints a selected dataset: %macro print(data=&syslast,obs=5); proc print data=&data(obs=&obs); title "%upcase(&data)"; run; %mend print; Suppose you want to print every dataset in the...
Read more »

Tags: , ,
Posted in SAS | Comments Off on Coding in the fast lane with data-driven macro calls

Time to trade in your jalopy macro?

February 11, 2013
By

Suppose you have an old jalopy that's perfectly reliable.  Your jalopy gets you where you wanna go: no frills; no drama. Do you trade your old wheels in for a racecar that accelerates like crazy and corners like it's on rails? Or stick with what's old...
Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Time to trade in your jalopy macro?

Don’t let your macros crash and burn

December 4, 2012
By

Your macro just crashed and burned.  So, what's the problem?  Let’s take a look: The text OR in the code above was misinterpreted as a logical operator.  To correct this issue, use the %STR function to protect (disable the normal meaning of) speci...
Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Don’t let your macros crash and burn

Example 9.35: Discrete randomization and formatted output

June 18, 2012
By

A colleague asked for help with randomly choosing a kid within a family. This is for a trial in which families are recruited at well-child visits, but in each family only one of the children having a well-child visit that day can be in the study. The...
Read more »

Tags: , , , , , , , , ,
Posted in SAS | Comments Off on Example 9.35: Discrete randomization and formatted output

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.