## Learn SAS

Learn about the latest tips, tutorials, upcoming events and certifications

0
Getting things in order with PROC SQL, macro and a SAS function

Order must be the most frequent cry for help in the SAS classroom. “HELP,” said my student in the classroom. “I work with messy health data. My users want to see data in this order.” T1.col1, t1.col2, t1.col3, t1.col4, t2.col5, t1.col6 and list the remaining columns in column position from

Learn SAS
0
You, too, can have a book at SAS Global Forum 2015

You’re walking around the bookstore at SAS Global Forum, looking at the new books and upcoming titles. There are lots of titles that look helpful, and a couple that are on your must-have list. You see SAS users and students eagerly talking with the authors, treating them like rock stars.

0
SAS Programming is going on tour

One of my favorite bands, Kings of Leon, is touring again this year and making a stop in Raleigh. I didn’t want to take any chances that I might miss them playing in my hometown so I bought tickets as soon as they went on sale. As you might agree,

Learn SAS
0
Write a SAS book

As SAS software continues to develop, the demand for information grows. That’s why there’s a big recruitment effort underway at SAS Books to get experts to share their best practices on using SAS. Recruiter Shelley Sessoms attended the Analytics 2014 conference in Frankfurt, Germany last week to find new writers.

Learn SAS
0
Producing normal density plots with shading

When teaching statistics, it is often useful to produce a normal density plot with shading under the curve. For example, consider a one-sided hypothesis test. An alpha value of .05 would correspond to a Z-score cutoff of 1.645. This means that 95% of a standard normal curve falls below a

0
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

0
Spice up SAS output with live Google maps

➤ DISCLOSURE! In June 2018 Google introduced changes to the way it handles its Maps platform. They now require API key in order to embed a map, plus Google Maps "projects" must now be associated with a billing account. Unless these new Google rules are met, Google maps described in

Learn SAS
0
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

Learn SAS
0
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 =

0
SAS Training: Show up and learn

Fear was written large on the faces of my class as I walked in to set up my SAS Enterprise Guide (EG) course. Participants talked in hushed tones and I wondered what this was all about. I was soon to find out during the introductions. Here are some snippets from

Learn SAS
0
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.

Learn SAS
0
Artisan crafted SAS programs

Madison Avenue has a new phrase to describe the things they are trying to sell to us: artisan crafted.  These days, there are artisan crafted breads and rolls, artisan crafted beers, artisan crafted coffees, artisan crafted soaps, and a host of other artisan crafted products.  Artisan crafted seems to have

0
SAS tutorial: Create simple scatter plots with two variables using SAS

This SAS tutorial video will show you how to generate plots for two continuous numeric variables with Base SAS. Basic scatter plots, linear or curvilinear regression lines, confidence intervals or ellipses, and multiple plot overlays are demonstrated. To learn more about this topic, check out our SAS Programming 1: Essentials

0
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

0

As I was preparing for a customer introduction to using SAS Enterprise Guide, I asked them to send me all the questions they had regarding the Enterprise Guide usage. It turned out that many of their questions can be answered with a single feature called an autoexec, or automatically executable

Learn SAS
0
SAS author's tip: Why think %locally?

This week's SAS tip is from Robert Virgile and his illuminating new book SAS Macro Language Magic: Discovering Advanced Techniques. Robert has 30 years of experience developing and teaching SAS classes. And his new book is filled with powerful programming techniques. If you like this week's free excerpt, you can read

Learn SAS
0
Solving the analyst’s toughest problems with SAS

If you’re an analyst, you know discovery in a complicated data set is one of the toughest problems to solve. But did you know the Business Knowledge Series course, Exploratory Analysis for Large and Complex Problems Using SAS Enterprise Miner, can help you solve those issues by tackling real-world problems?

Learn SAS
0
SAS knowledge that's music to your ears

We are all busy. Between demands from our career, families and communities, I am willing to bet we easily fill the 24 hours we get each day. But sometimes we're in such a rush or so focused on getting our to-do list checked off that we miss out on some

Learn SAS
0
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

0
Write a book for SAS

Have you written a popular SAS Global Forum paper? Have you shared a winning case study with your colleagues? Have you talked about a cool, new feature you found in SAS? Well, share it with the world! SAS Press can help you share your knowledge and expertise worldwide. We’ve published

0
SAS tutorial: Print a simple listing with SAS

In this tutorial video, you will learn to print a simple listing with Base SAS. You see how to write a PRINT procedure step to display a SAS data set. You also see how to use statements and options to subset observations and variables and enhance the report.   Learn

Learn SAS
0
The Hilbert matrix: A vectorized construction

The Hilbert matrix is the most famous ill-conditioned matrix in numerical linear algebra. It is often used in matrix computations to illustrate problems that arise when you compute with ill-conditioned matrices. The Hilbert matrix is symmetric and positive definite, properties that are often associated with "nice" and "tame" matrices. The

0
SAS tutorial: Creating a new variable in SAS

This SAS tutorial video will show you how to create a new variable with Base SAS. During the step-by-step video, you will see exactly how to create and modify numeric and character variables using assignment statements in a DATA step. Watch and learn… To learn more about the steps in

Learn SAS
0
SAS/IML available to all students through SAS Analytics U

When spontaneous applause broke out during Dr. Jim Goodnight's presentation at the opening session of SAS Global Forum 2014, I was one of the people cheering the loudest. The SAS CEO had just announced free software for students and professors at universities around the world. The SAS University Edition will

Learn SAS
0
SAS tutorials: Filter and sort data in SAS

These two tutorial videos will show you how to filter and sort data in Base SAS. In this first video, you will learn to use a WHERE statement in Base SAS to filter or subset SAS data. Data sets can be very large and filtering data enables you to select