Posts Tagged ‘ Getting Started ’

The next power of 2 and other tricks with logarithms

October 31, 2014
By
The next power of 2 and other tricks with logarithms

The other day I was doing some computations that caused me to wonder, "What is the smallest power of 2 that is greater than a given number?" The mathematics is straightforward. Given a number n, find the least value of k such that 2k ≥ n or, equivalently, k ≥ […]

Read more »

Choosing bins for histograms in SAS

August 25, 2014
By
Choosing bins for histograms in SAS

When you create a histogram with statistical software, the software uses the data (including the sample size) to automatically choose the width and location of the histogram bins. The resulting histogram is an attempt to balance statistical considerations, such as estimating the underlying density, and "human considerations," such as choosing […]

Read more »

Ten tips for learning the SAS/IML language

August 11, 2014
By
Ten tips for learning the SAS/IML language

A SAS customer wrote, "Now that I have access to PROC IML through the free SAS University Edition, what is the best way for me to learn to program in the SAS/IML language? How do I get started with PROC IML?" That is an excellent question, and I'm happy to […]

Read more »

Overview of new features in SAS/IML 12.3

July 30, 2014
By
Overview of new features in SAS/IML 12.3

Unless you diligently read the "What's New" chapter for each release of SAS software, it is easy to miss new features that appear in the language. People who have been writing SAS/IML programs for decades are sometimes surprised when I tell them about a useful new function or programming feature. […]

Read more »

How to generate a grid of points in SAS

June 9, 2014
By
How to generate a grid of points in SAS

In many areas of statistics, it is convenient to be able to easily construct a uniform grid of points. You can use a grid of parameter values to visualize functions and to get a rough feel for how an objective function in an optimization problem depends on the parameters. And […]

Read more »

Specify formats when you write vectors to a data set

June 2, 2014
By
Specify formats when you write vectors to a data set

Sometimes you have data in SAS/IML vectors that you need to write to a SAS data set. By default, no formats are associated with the variables that you create from SAS/IML vectors. However, some variables (notably dates, times, and datetimes) should have formats associated with the data values. You can […]

Read more »

An easy way to generate a vector of letters

May 27, 2014
By
An easy way to generate a vector of letters

A little-known but useful feature of SAS/IML 12.3 (which was released with SAS 9.4) is the ability to generate a vector of lowercase or uppercase letters by using the colon operator (:). Many SAS/IML programmers use the colon operator to generate a vector of sequential integers: proc iml; x = […]

Read more »

Tips for concatenating strings in SAS/IML

May 14, 2014
By
Tips for concatenating strings in SAS/IML

Last week, as part of an article on how spammers generate comments for blogs, I showed how to generate random messages by using the CATX function in the DATA step. In that example, the strings were scalar quantities, but you can also concatenate vectors of strings in the SAS/IML language. […]

Read more »

Blanks and lengths: Understanding SAS/IML character vectors

May 5, 2014
By
Blanks and lengths: Understanding SAS/IML character vectors

SAS programmers are probably familiar with how SAS stores a character variable in a data set, but how is a character vector stored in the SAS/IML language? Recall that a character variable is stored by using a fixed-width storage structure. In the SAS DATA step, the maximum number of characters […]

Read more »

Summary of new features in SAS/IML 12.1

April 14, 2014
By
Summary of new features in SAS/IML 12.1

I enjoy blogging about new functionality in the SAS/IML language because I can go into more depth and provide more complicated examples than the SAS/IML documentation. Today's article is a summary of all of my posts about features that were added to SAS/IML 12.1, which shipped in August 2012 as […]

Read more »


Subscribe

Email:

  Subscribe