Posts Tagged ‘ Tips and Techniques ’

Convert a vector to a string

July 27, 2015
By
Convert a vector to a string

Base SAS contains many functions for processing strings, and you can call these functions from within a SAS/IML program. However, sometimes a SAS/IML programmer needs to process a vector of strings. No problem! You can call most Base SAS functions with a vector of parameters. I have previously written about

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Convert a vector to a string

Five reasons to use ODS EXCLUDE to suppress SAS output

May 28, 2015
By

I previously wrote about the best way to suppress output from SAS procedures. Suppressing output is necessary in simulation and bootstrap analyses, and it is useful in other contexts as well. In my previous article, I wrote, "many programmers use ODS _ALL_ CLOSE as a way to suppress output, but

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Five reasons to use ODS EXCLUDE to suppress SAS output

What is the best way to suppress ODS output in SAS?

May 26, 2015
By
What is the best way to suppress ODS output in SAS?

SAS procedures can produce a lot of output, but you don't always want to see it all. In simulation and bootstrap studies, you might analyze 10,000 samples or resamples. Usually you are not interested in seeing the results of each analysis displayed on your computer screen. Instead, you want to

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on What is the best way to suppress ODS output in SAS?

An easy way to clear your SAS titles

May 4, 2015
By
An easy way to clear your SAS titles

Did you know that if you have set multiple titles in SAS, that there is an easy way to remove them? For example, suppose that you've written the following statements, which call the TITLE statement to set three titles: title "A Great Big Papa Title"; title2 "A Medium-sized Mama Title";

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on An easy way to clear your SAS titles

Techniques for scoring a regression model in SAS

February 19, 2014
By
Techniques for scoring a regression model in SAS

My previous post described how to use the "missing response trick" to score a regression model. As I said in that article, there are other ways to score a regression model. This article describes using the SCORE procedure, a SCORE statement, the relatively new PLM procedure, and the CODE statement.
Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Techniques for scoring a regression model in SAS

The missing value trick for scoring a regression model

February 17, 2014
By
The missing value trick for scoring a regression model

A fundamental operation in statistical data analysis is to fit a statistical regression model on one set of data and then evaluate the model on another set of data. The act of evaluating the model on the second set of data is called scoring. One of first "tricks" that I
Read more »

Tags: , , ,
Posted in SAS | Comments Off on The missing value trick for scoring a regression model

Write a matrix in the "long form"

December 2, 2013
By
Write a matrix in the "long form"

If you write an n x p matrix from PROC IML to a SAS data set, you'll get a data set with n rows and p columns. For some applications, it is more convenient to write the matrix in a "long format" with np observations and three columns. The first
Read more »

Tags: , ,
Posted in SAS | Comments Off on Write a matrix in the "long form"

Square root transformations: How to handle negative data values?

October 30, 2013
By
Square root transformations: How to handle negative data values?

I was looking at someone else's SAS/IML program when I saw this line of code: y = sqrt(x<>0); The statement uses the element maximum operator (<>) in the SAS/IML language to make sure that negative value are never passed to the square root function. This little trick is a real
Read more »

Tags: , ,
Posted in SAS | Comments Off on Square root transformations: How to handle negative data values?

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.