SAS Programming – Day 10

Arrays in SAS

  • SAS arrays are another way to temporarily group and refer to SAS variables. A SAS array provides a different name to reference a group of variables
  • Array statement begins with keyword ARRAY followed by array name and N – number of elements within array
  • _temporay_  option is used to create a temporary array

Base SAS Programming – Day 9

Looping in SAS

  1. Functions in SAS:  Continued
    • Text function:
      •  Compress – Returns a character string with specified characters removed from the original string
      • Index – Returns the position of the specific character in a string
    • Use of upcase, lowcase and propcase functions in string comparison
    • Math / Stat functions: Like Int, Round, Sum, Mean etc
    • Difference between Mean value (or any aggregate function) of Proc Means / Summary and Mean function
  2. Loops in SAS : Do Loops
    • Loops are used to iterate through every observation for specified number of times to obtain a desired result
    • Types of Loops:
      • Do Loop
      • Do While
      • Do Until
    • Default increments by 1
    • Can use BY to increment by any value other than 1

Base SAS Programming – Day 8

Functions in SAS (Continued)

  1. Text Functions
    • Catx – to concatenate characters / strings with any delimiter. Cat is also a function used to concatenate characters / strings
    • Trim – to remove trailing blanks in a string
    • Tranwrd – Replaces all occurrences of a substring in a character string
    • Translate – Replaces specific characters in a character expression.
    • Do check out Compress and other Text functions like Upcase, Lowcase and Propcase
  2. Date and Time Functions
    • Day – Returns the Day from a SAS date value
    • Month – Returns the Month from a SAS date value
    • Year – Returns the year from a SAS date value
    • Week – Returns the week number from a SAS date value (Try weekday function)
    • Mdy – Concatenates Month, Day and year into a date value
    • Today – Returns current system date
    • Datdif – Difference between 2 dates in days
    • Yeardif – Difference between 2 dates in years
    • INTCK – Returns the number of interval boundaries of a given kind that lie between 2 dates.
    • INTNX – Increments a date value by a given time interval, and returns a date

Base SAS Programming – Day 1

The BASE SAS video series begins with the assumption that the student viewer has no background in SAS programming and in fact very limited to no prior exposure to any kind of programming at all. Base SAS video series comprises of 9 video lectures (Average of hour and a half each), plus additional videos covering Advanced topics like PROC SQL and SAS Macros.

Day 1 topics as below —

  1. Intro to Libraries, Data step and Proc step in SAS
  2. Data step example:
    • Creating a sample dataset using Datalines / Cards statement
    • Understanding data types in SAS
    • Informat and Format
    • Label
  3.  Proc step example: Overview
    • Proc Contents – to know the dataset structure, with list of variables and number of observations
      • Varnum option – to list the variables of a dataset in creation order (otherwise the list is in alphabetic order)
    • Proc Print – to view the data in a dataset.
      • Label option and Var statement
    • Proc Means – to extract basic statistics of a numerical variables in a dataset like N, Mean, Standard Deviation, Minimum and Maximum (default)

Online Batch on SAS Programming (Base and Advanced)



Learn-Analytics is starting an online batch on SAS Programming (Base and Advanced) on Saturday, Jan 14th. Classes are scheduled at 2000 IST (1430 GMT, 0930 Eastern), 3 hours a day. For those wishing to register for the training, the first two classes (6 hours of training) will be free to attend and enabling participants to evaluate the trainer as well as the delivery mechanism.

Medium of training will be through Webex, the instructor will take the participants through hands on sessions using datasets and case studies with exercises at the end of each session. Recordings of the session will be made available to all participants post the training for a period of 3 months.

For the detailed modules design and topics covered, click here. Interested candidates can drop us an email at or fill in the contact form here,  we will forward the webex invitation link for the free evaluation.


Demo on Time Series using Exponential Smoothing (IBM SPSS and Excel)

Following up on our last week’s Webex session on Logistic Regression for credit scoring (you can catch it here), this Sunday we will demonstrate the technique of exponential smoothing in time series forecasting.

More specifically, during the webinar we will take you through the basic decomposition of a time series into its components:

  • Trend
  • Seasonality
  • Cyclic
  • Error

We will concentrate on extracting and forecasting the trend and seasonality of a series. Trend component can be extracted using Exponential smoothing (Single, double and triple depending on the slope and pattern) and building a seasonal index to forecast the seasonal variation.

The webinar will demonstrate how this can be done using simple formulas on an excel sheet itself and then introduce the time series function in IBM SPSS. A basic introduction to Box-Jenkins (ARIMA) modelling will also be covered.

A trial version of IBM SPSS version 20 can be downloaded from here. (You will need to fill in some details). Those interested in attending the seminar can drop an email at or fill in the form at  and we will mail you the webex invite. The webinar is scheduled on Sunday, 15th Jan, 0930 IST – 0400 GMT.

The webinar is free to attend.

To receive regular updates, please join our linkedin group Learn Analytics.


How to enter the Analytics Industry?

We have been in the field of Analytics training for over 4 years now (current and previous organization) and have trained personally over 1000 students in both SAS programming as well as advanced analytics including both retail and corporate clients.

One of the most repeated queries I field from my students is “How do I get in?” or “How do I convince an Analytics company to hire me ?” or “I have 10 years experience in so-and-so industry, how do I make a switch to Analytics?” . If only I had a rupee for everytime I was asked this question, I guess I could have retired by now! (or maybe 10 Rs/question).

Well, there is no singular answer or approach to enter the industry, off-campus freshers face a tortuous task in breaking in, to get hired you need to have experience in Analytics and to get experience in Analytics, you need to be already hired somewhere. Its an age old challenge.

Back in the day, all technical trades were controlled by guilds (for e.g. carpentry, masonry or blacksmiths) which acted both as facilitators to the chosen and entry barriers to the upstarts. To enter the field, a young man (or person) would have to grovel before an established artisan to get an unpaid apprenticeship in return for lodging and food. This was generally unpaid labor but in the bargain the apprentice gained experience and the artisan free labor. After a few years the apprentice would be granted membership of the guild and be free to setup on his own.

Jump to the 21st century and transplant this to Analytics, How do YOU break in ? The challenge a 1000 years after the establishment of guilds remains the same, to be hired you need experience under your belt and to be experienced you need to get hired.

A few clarifications for people trying to break in

  • First off, there is no formal qualification or degree required to be an Analytics professional. (You dont need fancy Maths/Stats/Engg degrees, I have seen arts graduates become Subject Matter Experts in collections analytics).
  • Secondly, there is no age limit, 40 year olds have made the jump and done extremely well.
  • Its a job seekers market, provided you have reached the magic figure of 12 months experience.

Experience in analytics is King today, people who have experience can literally dictate hiring terms.

But how to get that initial experience? Therein lies the heartbreak, though there is a way, just like it was thousands of years ago, apprenticeships (we call them internships now), you have to convince a company, any analytics company to hire you either at a very low salary or even no salary in the beginning. Face it, you need them more than they need you at this stage. Anything to get that valuable CV line about experience in. This is typically a call which freshers just out of college are able to take easily. But for those coming with previous industry experience will find difficult to make the jump. Whether to make this jump or not is a decision you have to take.

I have seen 30 year olds leave stable jobs to start in Analytics at Rs 12,000 /month salaries. A year later they are already at their previous levels. 32 year housewife who took up a SAS programming course was offered a 10,000/month contract for 3 months at a small analytics company, she is now a middle level manager in the analytics arm of a major MNC. The pattern is evident, do whatever it takes to get working once you have acquired a few skills; whether through some training courses or self study.

Analytics companies do not care about your educational qualification, formal background, if you have prior analytics experience, you are a rare commodity and you will be snapped up.

That said, what are the skills that one needs to even get a foot in the door. I have one word for that – “SAS”. SAS programming jobs are probably one of the easiest ways to get a foothold in the industry today. SAS certifications (exam costs some USD 200, quite cheap for the benefits it provides) on your CV can act as a substitute for SAS programming experience. The companies will treat you as a known commodity if you have cleared the certification exams and will increase your chances of shortlisting.(I will insert a disclaimer here – since our organization specializes in SAS training for certification, this opinion piece may be considered biased to convince the reader to enroll for SAS training, that is not the objective, I am merely stating an observation)

Secondly, there are SAS jobs and then there are SAS Analytics jobs. One mistake that people can make is to take an initially higher paying pure SAS programming job over a SAS Analytics profile. Candidates need to be very aware of the nature of work they are getting into, a company which offers work in predictive modeling or data mining using SAS should always be preferred over a pure SAS programming job. A mistake here could mean a career of reporting and ad hoc requests versus definitely more glamorous side of Predictive modeling. Beg, borrow, steal, kill or even pay, but get experience of predictive modeling under your belt. A small difference in the beginning but over 30 year career can mean totally divergent paths.

A note here: Typically startups are more likely to hire people based on attitude/aptitude rather than a CV. They provide the best opportunities for people who really want to break in.

In sum :

  • Study a lot, it takes time to master any new technical skill, typically to reach an employable skill level in SAS and basic analytics will require upto 500 hours of training, practice and self study. (Target 4 hours a day over a period of 3-4 months)
  • Be prepared to spend time in the trenches, you have to be mentally ready to take a salary cut, maybe a huge one to get that elusive experience initially. (Target internships and startups here, have a target of 8-12 months experience under your belt before you start looking around after this)
  • Make intelligent choices , in your career, even a 1 week project in predictive modeling using say regression could make all the difference.(Beware of pure SAS programming jobs, they may only be on the reporting side, keep trying to gain experience in data modeling projects)
  • Every big MNC has an analytics arm, if you are already working in such a company, pull all strings to get into an allied project which you can leverage for experience, or an internal transfer. (I know a guy who was in the BPO arm of a major MNC, he bugged his reporting chain for 1.5 years before they finally relented, today he is travelling all over the world as an SCM analytics consultant!)
  • Those who play it like they have nothing to lose are the ones who win big, bring your attitude with you
Do let us know if you found this post helpful, for any queries regarding analytics careers or analytics training drop in a mail at or check out our website
We are interested in learning how you made the jump into the analytics industry, drop us a note in the comments section for the other readers.

R-Rattle Training Video

Today, we are going to introduce a very powerful data mining tool called Rattle. Interesting feature of Rattle is that it is a GUI which sits on top of R. What it means is that it gives users a point and click interface to build data mining projects, predictive Models etc without writing a single line of R code.

In the featured video we have built various predictive models on a credit scoring dataset and compared their performances against each other using ROC curves. Models built are –>

  • Decision Trees
  • Random Forests
  • Adaptive Boosting
  • Support Vector Machines
  • Logistic Regression
  • Neural Networks

This was done without writing any R code (except to launch rattle). Total video lenght is about 17 minutes, which will take you through data import in rattle, variable exploration, model building and model evaluation using ROC’s.

This video is for people from an advanced analytics background as we have not explained much of the methodologies behind the techniques, merely how to do in Rattle. Those who can understand the methodology and are not working in the analytics industry, you should immediately jump ship, greener pastures are awaiting (Seriously, if you understand even 40% of this, you cannot be unemployed!)

For those, who want to understand and learn stuff shown on the video, check out our website, we specialize in Analytics Training for students worldwide. We provide SAS, R , Advanced Analytics trainings.

For doubts/queries, batch timings, drop in  a mail to

  1. Click here to download R
  2. Click here to download Rattle
  3. Click here to download the dataset discussed in the video

To install rattle, simply follow the instructions on the website linked above, if you have problems in installing,drop us a mail, we will be glad to help you out. We will be following up on a detailed post on R and rattle installation with troubleshooting.

Drop in comments to give us feedback!!

Learn Analytics Team