Posts Tagged ‘ Reading and Writing Data ’

Reading special SAS data sets into matrices

January 28, 2013
By
Reading special SAS data sets into matrices

SAS has several kinds of special data sets whose contents are organized according to certain conventions. These special data sets are marked with the TYPE= data set attribute. For example, the CORR procedure can create a data set with the TYPE=CORR attribute. You can decipher the structure of the data
Read more »

Tags: ,
Posted in SAS | Comments Off

Reading big data in the SAS/IML language

January 21, 2013
By
Reading big data in the SAS/IML language

A SAS/IML user on a discussion forum was trying to read data into a SAS/IML matrix, but the data was so large that it would not fit into memory. (Recall that SAS/IML matrices are kept in RAM.) After a few questions, it turned out that the user was trying to
Read more »

Tags: , ,
Posted in SAS | Comments Off

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

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.