Showing posts with label Base SAS. Show all posts
Showing posts with label Base SAS. Show all posts

Time Series Forecasting - Part 5

ARIMA using SAS


We have covered basics about time series and also the basic methods of forecasting. It is time to learn the most important and most widely used for time series forecasting : ARIMA.

It is not possible to write ARIMA in a single stretch, it being full of complication, hence we plan to write it in series of article.

SAS Project 1 - Part 1


What's being imported in India?


For long many Ask Analytics students have asked to explain a real time case study and here we are with a very interesting one.

While the whole world is a after Twitter and Kaggle data, we are using an indigenous data, quite rich daily import and export statistics released for public by Government of India on one of its websites. Consider an objective of learning import profile of India.

We would learn several new thing during the course of project.


Another very important Date function : INTNX

Change the date

SAS is full of date related function and we will try to cover most used and important functions at Ask Analytics sooner or later. We have already covered INTCK function, which helps identify the gap in between two dates on various scales. Let's now understand its sister function INTNX, which is used for the date progression.

It would help answer, "when is our next date?"

Add numbers (including missing) without "Sum function" and "If statements"


A contemporary SAS interview question


Recently, a friend shared a SAS interview question that she faced in one of the Interviews she appeared in.
The question might sound very basic initially but when I heard about the constraints, I found it too be quite tricky one. It required to make a little more use of my grey matter.

Sharing, how I approached to the problem .

Advanced Date function : INTCK

INTCK is a very useful function that returns the number of intervals between two dates. Intervals can be in terms of WEEK, MONTH, QUARTER or YEAR etc.

There are other variation also possible in period calculations with this function.

So let's explore about the same in detail.

Concept of Date in SAS

How to deal with dates in SAS


Let's learn all the important functions dealing with Time and Date in SAS.  Also we are covering the background processing of date and time variables in SAS.

So get ready for the date and be on time !




IF ... else statement in SAS


How to apply logic in SAS ?

In the series of Base SAS articles, here comes my favourite one... 


Let's learn writing IF ... Else statements in a different way. I am big time fan of visualization ...as reading is boring; so trying to make you visualize the back end processing of IF statement in a very different way and learn its utility along with.

Base SAS Certification Questions Series - Part 1

The Global SAS certification exam is administered by SAS and Pearson VUE together. There are 60-65 multiple choice questions in Base SAS certification exam and candidate must achieve 70% score to pass multiple choice questions in  110 minutes.

We are starting a series of articles to help you prepare for this examination. Covering a few questions in first article of the series along with their explanation.

SAS Functions - Part 1 - Character Functions

Let's learn SAS Functions

Functions are customized bullets used to kill an identified target (to achieve a particular derivation). We can classify all the functions in SAS into three groups :
  • Character Functions
  • Numeric Functions
  • Date Functions
Lets learn these functions group wise :

How to remove a line feed from a field ?

Remove CRLF Issue from SAS data

Sometimes in our SAS data, we encounter a problem of CRLF ( Carriage Return - Line Feed) in a variable. What's that ???

Have you ever seen a old type of type writer, In that during typing, once one line gets full, we need to return the print carriage to old position and give a line feed to start typing in the next line. We do the same in modern computers, pressing "Enter" key while typing.

It is Okay to have CRLF in existence, but not in our data. While we export such data having CRLF within a field, it creates big havoc ?Let's explore it in detail and also check the remedy in SAS ...

Base SAS - Logical Sub-setting part 2 (Covering If)


How to subset a data logically in SAS

In day to day work, we need to fetch only selective data for analysis purposes e.g. for one analysis, we need data only for female customer, for another data for male customers between age 14 - 40 might be required. Such type of conditional sub-settings, we have named as logical sub-setting.

How to do it  ... explore here with examples.



Base SAS - Logical Sub-setting part 1 (Covering Where)

How to subset a data logically in SAS

In day to day work, we need to fetch only selective data for analysis purposes e.g. for one analysis, we need data only for female customer, for another data for male customers between age 14 - 40 might be required. Such type of conditional sub-settings, we have named as logical sub-setting.

How to do it  ... explore here with examples.


Base SAS - Few basics


Let's learn few basics before going into depth

This is the first article in the series of Base SAS that covers the very basic things that a SAS analyst need to use day in day out.

As there are too many things to learn about it, but we are covering are those things which are  practically being used.


Base SAS -Exporting Data out of SAS

How to export a SAS dataset out in your disk

Unlike Import, Export in  SAS is not that complicated to learn. We strongly recommend to use Procedure for exporting; it would suffice in 99.99% situations.

Feeling impatient to learn it ... all right here it is.

Base SAS - Importing Data into SAS

How to read/Import data into SAS

This is the first article in the series of Base SAS that covers the very first thing that an analyst needs to learn in SAS.

Theoretically there are too many things to learn about it, but we are covering are those things which are  practically being used in the World of Analytics.

Proc SQL vs. Data Step in SAS - Part 2


Join (Proc SQL) vs. Merge (Data step)

Your wait is over. Let's deep dive a little into the background working algorithm of Join and Merge. This one is quite interesting, here efficiency as well as the result may vary ...

Please go through the first part of this else it would be like start watching a movie at interval.

Proc SQL vs. Data Step in SAS - Part 1

How Data Step in SAS and Proc SQL differ and which one should I use and where ?

Is that even a big question that one should bother about ? Leaving syntax, is there even a difference between two? Probably, you must be thinking about these points, Right ?

Of course, you need to ask these question ... so let me explain the key differences between the two and suggest you the best practice.

Difference between "Where" and "Having" in Proc SQL


What is the difference between the "Where" and "Having" statements in Proc SQL ?


Common but only partially correct answer:

Where uses parent variable for sub-setting, while Having is used for sub-setting data on the basis of calculated variables.  

Precautions while merging datasets in SAS


What Precautions would you take while merging two datasets in SAS ?

Precautions while merging datasets is one of the hot favourite questions of SAS interviewers.

Either you can give cliche answer for sake of answering, or you can answer to impress ... choice is all yours !