Posts Tagged ‘ Getting Started ’

Sum a series in SAS

April 22, 2015
By
Sum a series in SAS

A customer asked: Dear Rick, How do we go about summing a finite series in SAS? For example, I want to compute for various integers n ≥ 3. I want to output two columns, one for the natural numbers and one for the summation of the series. Summations arise often

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off

Writing data in chunks: Does the chunk size matter?

March 9, 2015
By

I often blog about the usefulness of vectorization in the SAS/IML language. A one-sentence summary of vectorization is "execute a small number of statements that each analyze a lot of data." In general, for matrix languages (SAS/IML, MATLAB, R, ...) vectorization is more efficient than the alternative, which is to

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off

How to get started with SAS: Free videos for beginners

March 10, 2014
By

On most Mondays I blog about a function, programming technique, or resource that is useful for programmers who are getting started with SAS software. Recently I learned that my colleagues in the SAS education division have been hard at work developing a series of short videos that explain basic tasks
Read more »

Tags: ,
Posted in SAS | Comments Off

Aborting a SAS/IML program upon encountering an error

March 3, 2014
By

A colleague sent me an interesting question: What is the best way to abort a SAS/IML program? For example, you might want to abort a program if the data is singular or does not contain a sufficient number of observations or variables. As a first attempt would be to try
Read more »

Tags: , ,
Posted in SAS | Comments Off

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

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

Define functions with default parameter values in SAS/IML

February 10, 2014
By
Define functions with default parameter values in SAS/IML

One of my favorite new features of SAS/IML 12.1 enables you to define functions that contain default values for parameters. This is extremely useful when you want to write a function that has optional arguments. Example: Centering a data vector It is simple to specify a SAS/IML module with a
Read more »

Tags: , , ,
Posted in SAS | Comments Off

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

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.