Susan Slaughter

Archive for the ‘Little SAS Book Series’ Category

Tips for Learning SAS

In China, Everything, Guest Blog, Little SAS Book Series, SAS on January 13, 2019 at 8:05 pm

New to SAS?  Here are tips from the translator of The Little SAS Book, Fifth Edition.

Hongqiu Gu, Ph.D. works at the China National Clinical Research Center for Neurological Diseases at the National Center for Healthcare Quality Management in Neurological Diseases at Beijing Tiantan Hospital, Capital Medical University.

He shared these important tips to learn SAS well:

1.  Read SAS Documentation

I have not counted the number of SAS books I have read; I would estimate over 50 or 60.  The best books to give me a deep understanding of SAS are in the SAS Documentation, including SAS Language Reference Concepts, SAS Functions and CALL Routines Reference, SAS Macro Language Reference, and so on.  There are lots of excellent books published by SAS Press, and usually they are concise and suitable for quick learners.  However, when I realized that SAS could give me a powerful career advantage, I needed to learn SAS systematically and deeply.  I believe the SAS Documentation provides the most authoritative and comprehensive learning materials.  Besides, the updated SAS Documentation is free to all readers.

2.  Use the SAS Help and Documentation frequently

No one can remember all the syntaxes or options in SAS.  However, don’t worry, SAS Help and Documentation is our best friend.  I use the SAS Help and Documentation quite often.  Even as an experienced SAS user, there are still many situations in which I need to ask for help from SAS Help and Documentation. Every time I use it, I learn something new.

3.  Solve SAS related questions in SAS communities

As the saying goes, practice makes perfect.  Answering SAS related questions is a good way to practice.  Questions can come from daily work, from friends around you, or from other SAS users on the web.  From 2013 to 2015, I spent a lot of time in the largest Chinese SAS online  community answering SAS related questions and I learned many practical skills in a short period.

4.  Make friends with skilled SAS programmers

Learning alone without interacting with others will lead to ignorance.  I have learned a lot from other experienced SAS users and SAS developers.  We share our ideas from time to time, and benefit a lot from the exchange.

 

 

The Little SAS Book in China

In China, Everything, Guest Blog, Little SAS Book Series, SAS on January 13, 2019 at 4:29 pm

Recently The Little SAS Book reached a major milestone.  For the first time ever, it was translated into another language.  The language in this case was Chinese, and the translator was Hongqiu Gu, Ph.D. from the China National Clinical Research Center for Neurological Diseases at the National Center for Healthcare Quality Management in Neurological Diseases at Beijing Tiantan Hospital, Capital Medical University.

To mark this achievement, I asked Hongqiu a few questions.

Susan:  First I want to say how honored I am that you translated our book.  It must have been a lot of work.  Receiving a copy of the translation was a highlight of the year for me.  How did you learn SAS?

Hongqiu:  How did I learn SAS?  That is a long story.  I had not heard of SAS before I took an undergraduate statistics course in 2005.  The first time I heard the name “SAS,” I mistook it for SARS (Severe Acute Respiratory Syndrome).  Although the pronunciations of these two words are entirely different for native English speakers, most Chinese people pronounced them as /sa:s/.  At that time, I was not trying to learn SAS well, and I simply wanted to pass the exam.  After the exam, all I had learned about SAS was entirely forgotten.  However, during the preparation of my master’s thesis, I had to do a lot of data cleaning and data analysis work with SAS, and I began to learn SAS enthusiastically.

Susan:  Why did you decide to translate The Little SAS Book?

Hongqiu:  Although I highly recommend the SAS Documentation for learning SAS, most beginners need a concise SAS book to give them a quick overview of what SAS is and what SAS can do.  There is no doubt that The Little SAS Book is the best one as the first SAS book for SAS beginners.  However, it was not easy for a Chinese SAS beginner to get a hardcopy of The Little SAS Book because it was not available in the Chinese market and the price was too high if they shopped overseas.  Another barrier is the language.  Most beginners still want an elementary book in their mother language. Besides, lots of R books had been introduced and translated into Chinese.  Therefore, I believed there was an urgent need to translate this book into Chinese.  So I tried several times to contact SAS press to get permission to translate it into Chinese, but no reply.  Things changed when manager Frank Jiang from SAS China found me after my book, The Romance of SAS Programming, was published by Tsinghua University Press.

Susan:  How long did it take you to translate the book?

Hongqiu:  First, I must state that the Chinese version of The Little SAS Book is a collaborative work.  Manager Frank Jiang from SAS China together with managing editor Yang Liu from Tsinghua University Press did much early-stage work to start this project.  We began the translation in early April 2017 and finished the translation in July 2017.  After that, we took more than three months to complete the two rounds of cross-audit to make sure the translation was correct and typo errors were minimized.

Members of the translation team include Hongqiu Gu, Adrian Liu, Louanna Kong, Molly Li, Slash Xin, Nick Li, Zhixin Yang, Amy Qian, Wei Wang, and Ke Yang.

Members of the audit team include Silence Zeng, Mary Ma, Wei Wang, Jianping Xue, and Sikan Luan.

Susan:  What was the hardest part of translating it?

Hongqiu:  The book is written in plain English and easy to understand.  We did not find any particular part that hard to translate.

Susan:  Are there a lot of SAS users in China?

Hongqiu:  There are a lot of SAS users in China.  I’ve no idea what the exact number of SAS users in China is.  With the increasing need for SAS users in medicine, life science, finance and banking industries, SAS users will become more and more prevalent.

Susan:  Thank you for sharing your experiences.  Perhaps someday we can meet in person at SAS Global Forum.

A Little Advice: How to Be a Top SAS Programmer

In Everything, Little SAS Book Series, ODS Graphics, SAS on April 6, 2018 at 1:18 pm

Recently I was honored to be interviewed by Mamadou Dakouo for his company DataSteps.

 

I was asked three questions:

  • How did I learn SAS?
  • What advice do I have for someone who wants to become a “top SAS programmer?”
  • What is my favorite SAS procedure?

My answers were

  • In graduate school
  • Be a self-starter
  • PROC FORMAT (runner-up: PROC SGPLOT)

For the details you can watch the 6 minute video.

What’s Your SAS Interface?

In Enterprise Guide, Everything, Little SAS Book Series, SAS on May 12, 2016 at 7:30 am

These days SAS programmers have more choices than ever before about how to run SAS.  They can use the old Display Manager interface, or SAS Enterprise Guide, or the new kid on the block: SAS StudioAll of these are included with Base SAS.

DisplayManager9-4window

Display Manager / SAS Windowing Environment

EG7-12window

SAS Enterprise Guide

SASStudio3-5window

SAS Studio

Once upon a time, the only choices were Display Manager (officially named the SAS windowing environment), or batch.  Then along came SAS Enterprise Guide.  (Ok, I know there were a few others, but I don’t count SAS/ASSIST which was rightly spurned by SAS users, or the Analyst application which was just a stopover on the highway to SAS Enterprise Guide.)

I recently asked a SAS user, “Which interface do you use for SAS programming?”

She replied, “Interface?  I just install SAS and use it.”

“You’re using Display Manager,” I explained, but she had no idea what I was talking about.

Trust me.  This person is an extremely sophisticated SAS user who does a lot of leading-edge mathematical programming, but she didn’t realize that Display Manager is not SAS.  It is just an interface to SAS.

This is where old timers like me have an advantage.  If you can remember running SAS in batch, then you know that Display Manager, SAS Enterprise Guide, and SAS Studio are just interfaces to SAS–wonderful, manna from heaven–but still just interfaces.  They are optional.  You could write SAS programs in Word or Notepad or some other editor, and submit them in batch–but why would you?  (I know someone is going to tell me that they do, in fact, do that, but the point is that it is not mainstream.  Only mega-nerds with the instincts of a true hacker do that these days.)

Each of these interfaces has advantages and disadvantages.  I’m not going to list them all here, because this is a blog not an encyclopedia, but the tweet would be

“DM is the simplest, EG has projects, SS runs in browsers.”

Personally, I think all of these interfaces are keepers.  At least for the near future, all three of these interfaces will continue to be used.  What we are seeing here is a proliferation of choices, not displacement of one with another.

So what’s your SAS interface?

 

A short history of The Little SAS Book

In Everything, Little SAS Book Series, Publishing, SAS on November 19, 2015 at 10:11 am

In celebration of SAS Press’ 25th anniversary, Lora Delwiche and I reminisced about what it was like writing the first edition of The Little SAS BookYou can read about it on The SAS Learning Post. LSB1_and_SAS_manual

Who was the first SAS user to write a SAS book?

In Everything, Little SAS Book Series, Publishing, SAS, Writing on November 12, 2015 at 9:59 am

First_SAS_Book_cover SAS Press has been publishing books written by SAS users for 25 years.  That made me wonder: Who wrote the first such book?  The answer depends on how you phrase the question.  You can read about it on the SAS Learning Post.

Save Big on SAS Books

In Everything, Little SAS Book Series, SAS on October 22, 2015 at 10:33 am

Have you been thinking about ordering a SAS book or two?  Now is the time to do it.  SAS Press is a quarter century old.  To celebrate, they are offering a 25% discount on books ordered by December 31, 2015.  To get the discount, use the promo code SMPBBP when you place your order at support.sas.com/publishing/ (only available in the US).

Since SAS Press always has FREE SHIPPING for books, this means you get a real bargain.  For example, if you were to order The Little SAS Book, Fifth Edition from Amazon.com, it would set you back $47.30.  But with the SAS Press 25% discount, the same book costs only $41.21.  Such a deal!

SASPress_25Anniv_1024x512-1My question is this: Will they offer a 50% discount in another quarter century?  We will just have to wait and see.

SAS Essentials

In Everything, Little SAS Book Series, SAS, Western Users of SAS Software on September 8, 2015 at 7:45 pm

WUSS2015logoThe SAS Essentials section at the Western Users of SAS Software conference was created for people who are new to SAS.  Each year this section includes three core presentations designed to give both a broad overview and, at the same time, a thorough grounding in the fundamentals of SAS. For years I have thought about teaching the SAS Essentials core classes.  Well, this year I finally took the plunge, so to speak.  I really did feel like I was diving into deep water.  It was overwhelming, but it was also fun!  I think I did a good job of covering the basics in a short space.  You can download my slides here:

How SAS Thinks: SAS Basics I

Introduction to DATA Step Programming: SAS Basics II

Introduction to SAS Procedures: SAS Basics III

Exercises for Learning SAS Programming

In Everything, Little SAS Book Series, SAS on August 21, 2015 at 10:36 am

LSBXcoverOur new book, Exercises and Projects for The Little SAS® Book Fifth Edition, includes a variety of exercises to help people learn SAS programming.  Rebecca Ottesen, Lora Delwiche and I designed this book so that it can be used either in a classroom setting or by individual readers working alone.

One of the challenges we faced in writing exercises was how to create questions that were thought-provoking and yet not too complicated for people who are just starting to learn SAS.  Our goal was not only to test readers’ knowledge, but to solidify that knowledge so they will remember what they learn.  That’s why we included different types of exercises.  Multiple-choice exercises are quick and easy, open-ended short answer exercises encourage readers to think a little more deeply about the material, and then programming exercises challenge readers to apply what they have learned.

The following questions are examples of the three types of exercises found in our book.  For help with these exercises, see section 4.13 “Producing Tabular Reports with PROC TABULATE” in The Little SAS® Book, Fifth Edition.

Multiple Choice

1.  For variables listed in a CLASS statement, what statistic will PROC TABULATE produce by default?

a. Sums
b. Percentages
c. Means
d. Counts

2.  If you specify two dimensions in a TABLE statement in PROC TABULATE, which dimensions will you get?

a. Pages and rows
b. Pages and columns
c. Rows and columns
d. Columns and rows

Short Answer

3.  Explain what happens to observations with missing values for variables listed in a CLASS statement in PROC TABULATE.  Describe an option you can use to change this default behavior.

4.  Is it possible to write a TABLE statement in PROC TABULATE that specifies a row dimension but no column dimension?  Explain your answer.

Programming Exercises

    5.  A friend, who has recently begun bird watching, keeps a list of birds.  For each species, she records its name and three one letter codes.  The codes indicate whether or not she has seen that species (S for seen, or N for not seen), the type of bird (G for game birds, S for songbirds, R for raptors, or W for waterfowl), and whether or not that species is migratory (M for migratory, or N for nonmigratory).  Use the data in her list to create summary reports.

a. Write a DATA step to read the following raw data into a SAS data set.

Bald Eagle     S R M
Barn Owl       S R M
Gambel’s Quail S G N
Canada Goose   S G N
Cardinal       N S N
Common Loon    N W M
Condor         N R N
Crow           S S N
Elf Owl        N R N
Golden Eagle   N R M
Goldfinch      S S M
Magpie         S S N
Mallard        S W M
Meadowlark     N S N
Mockingbird    S S N
Osprey         N R M
Robin          S S M
Scrub Jay      S S N
Rock Ptarmigan N G N
Turkey         N G N

b. Using PROC TABLULATE, produce a report with counts that specifies rows for the type of bird and columns for whether the bird has been seen.  Be sure to include an appropriate title.

c. Create user-defined formats to replace the one letter codes with formatted values for the type of bird and whether or not it has been seen.  Rerun the report using the new formats.

d. Use a different procedure to produce the same counts.  Then add a comment to your program describing the differences between the two reports.

We hope that you found this information helpful.  Visit the book page for additional information, reviews, and a free book excerpt.

Presenting the Newest Member of The Little SAS Book Family

In Everything, Little SAS Book Series, SAS on July 24, 2015 at 2:23 pm

LSBXcoverThere is a new kid on the block: Exercises and Projects for The Little SAS Book Fifth Edition.  Rebecca Ottesen, Lora Delwiche and I have worked for three years to complete this book of multiple choice, short answer, programming exercises, and projects.  This book is designed to be used as a supplement to the fifth edition of The Little SAS Book.  However, I think this book has turned out so well that someone who just wants practice with SAS programming could use this book by itself.

One of the great things about this book is that we have created 77 data sets for the programming exercises, and you can download these data sets for free.

For more information about our book or to download the data, click here.