Posts Tagged ‘ Reading and Writing Data ’

How to get data values out of ODS graphics

August 1, 2012
By
How to get data values out of ODS graphics

Many SAS procedures can produce ODS statistical graphics as naturally as they produce tables. Did you know that it is possible to obtain the numbers underlying an ODS statistical graph? This post shows how. Suppose that a SAS procedure creates a graph that displays a curve and that you want
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Indexing a SAS data set to improve processing categories in SAS/IML

July 16, 2012
By

I have blogged about three different SAS/IML techniques that iterate over categories and process the observations in each category. The three techniques are as follows: Use a WHERE clause on the READ statement to read only the observations in the ith category. This is described in the article "BY-group processing
Read more »

Tags: , ,
Posted in SAS | Comments Off

How to read data set variables into SAS/IML vectors

May 14, 2012
By
How to read data set variables into SAS/IML vectors

One of the first skills that a beginning SAS/IML programmer learns is how to read data from a SAS data set into SAS/IML vectors. (Alternatively, you can read data into a matrix). The beginner is sometimes confused about the syntax of the READ statement: do you specify the names of
Read more »

Tags: , ,
Posted in SAS | Comments Off

Creating symmetric matrices: Two useful functions with strange names

March 21, 2012
By
Creating symmetric matrices: Two useful functions with strange names

Covariance, correlation, and distance matrices are a few examples of symmetric matrices that are frequently encountered in statistics. When you create a symmetric matrix, you only need to specify the lower triangular portion of the matrix. The VECH and SQRVECH functions, which were introduced in SAS/IML 9.3, are two functions
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Reading ALL variables INTO a matrix

January 16, 2012
By
Reading ALL variables INTO a matrix

The SAS/IML READ statement has a few convenient features for reading data from SAS data sets. One is that you can read all variables into vectors of the same names by using the _ALL_ keyword. The following DATA steps create a data set called Mixed that contains three numeric and
Read more »

Tags: , ,
Posted in SAS | Comments Off

Reshape data so that each category becomes a new variable

November 4, 2011
By
Reshape data so that each category becomes a new variable

Being able to reshape data is a useful skill in data analysis. Most of the time you can use the TRANSPOSE procedure or the SAS DATA step to reshape your data. But the SAS/IML language can be handy, too. I only use PROC TRANSPOSE a few times per year, so
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Random Access: How to Read Specific Observation in SAS/IML Software

May 18, 2011
By

This article shows how to randomly access data in a SAS data set by using the READ POINT statement in SAS/IML software. I have previously discussed how to use the READ NEXT and READ CURRENT statements to sequentially access each observation i...
Read more »

Tags:
Posted in SAS | Comments Off

Sequential Access: Reading One Observation at a Time in SAS/IML Software

May 2, 2011
By

The most common way to read observations from a SAS data set into SAS/IML matrices is to read all of the data at once by using the ALL clause in the READ statement. However, the READ statement also has options that do not require holding all of ...
Read more »

Tags: , ,
Posted in SAS | Comments Off

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.