Posts Tagged ‘ SAS 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

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

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

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

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

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

Example 9.34: Bland-Altman type plot

June 5, 2012
By
Example 9.34: Bland-Altman type plot

The Bland-Altman plot is a visual aid for assessing differences between two ways of measuring something. For example, one might compare two scales this way, or two devices for measuring particulate matter. The plot simply displays the difference betw...
Read more »

Tags: , , , , , , , ,
Posted in SAS | Comments Off

Example 9.32: Multiple testing simulation

May 21, 2012
By

In examples 9.30 and 9.31 we explored corrections for multiple testing and then extracting p-values adjusted by the Benjamini and Hochberg (or FDR) procedure. In this post we'll develop a simulation to explore the impact of "strong" and "weak" control...
Read more »

Tags: , , , , , , ,
Posted in SAS | Comments Off

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: [email protected]

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.