Advanced SAS Tutorial
Last updated on 29th Sep 2020, Blog, Tutorials
SAS is a leader in business analytics. Through innovative analytics it caters to business intelligence and data management software and services. SAS transforms data into insight which can give a fresh perspective on business.
Unlike other BI tools available in the market, SAS takes an extensive programming approach to data transformation and analysis rather than a pure drag drop and connect approach. That makes it stand out from the crowd as it gives much finer control over data manipulation. SAS has a very large number of components customized for specific industries and data analysis tasks.
Why SAS is popular in job market?
SAS has over 40,000 customers worldwide and holds largest market share in advanced analytics. It has been tagged ‘leader’ consistently for last 6 consecutive years in advanced analytics platforms. In finance (BFSI) industry, SAS retains No. 1 spot and is being used as a primary tool for data manipulation and predictive modeling.
- 1. Data Security – Because of unparalleled data security provided by SAS software, it is leading the analytics software industry in BFSI sector.
- 2. Tech Customer Support – SAS provides one of the best tech support. If you are stuck in anything related to SAS whether it is installation related issue or clarity in any of SAS functions and procedures, they have both online and offline community to support you.
- 3. Detailed Documentation – SAS documentation is very detailed as compared to open source software like R and Python.
- 4. Memory Management – SAS can store datasets on hard drive and process bigger data set than size of your RAM.
- 5. Stable Software more important than cost of software license – 6. All the functions and procedures of previous software version are supported in new SAS versions. Cost of software license is a peanut to a bank or pharmaceutical company.
- 7. Legacy System – Many banks have been using SAS for last 20-30 years and they have automated the whole process of analysis and have written millions of lines of working code. To convert all the stable reporting system from SAS to R/Python, it may require significant additional cost.
Subscribe For Free Demo
Error: Contact form not found.
SAS Architecture
SAS architecture is divided mainly of three parts:
- Client Tier
- Middle Tier
- Back tier
Client tier:
Client tier is where the application is installed on a machine, where the user is sitting. It consists of the components which are used to view the portal and its content. It also includes a standard web browser that is used to interact with the portal over standard HTTP or HTTPS protocol. It also helps you to make the SAS web application firewall friendly.
Middle tier:
The middle tier offers a centralized access point for enterprise information. All access to content is processed by components operating of this tier. The separation of the business logic with display logic helps you to leverage the logic of the middle tier. Moreover, centralized points of access make it easier to enforce security rules, administer the portal and manage code changes.
The middle tier hosts the following functions:
SAS Information Delivery Portal Web Application : It is the collection of JSP, Java servlets, JavaBeans, and other classes and resources. These components help you to access information stored in the enterprise directory to create a customizable interface for the user.
Servlet Engine : The servlet engine is also called a servlet container. It is responsible for managing the SAS Information Delivery Portal Web Application. The servlet engine offers a run time environment. It provides concurrency, deployment, lifecycle management, etc.
Web server : Web server offers service for the servlet engine which can be used to host website. This should be accessed using the portal.
Back Tier:
The back tier is an area where the data and computation servers run which may contain business objects. It is an enterprise directory server. The enterprise directory server maintains metadata about content which is located throughout the enterprise.
How to Download and Install SAS
Local Download in your machine
Step 1) Go to this link https://www.sas.com/en_in/software/university-edition.html and click on Get Free Software.
Step 2) Select your Operating System.
Step 3) SAS requires Virtualization Software like VirtualBox to be installed before it can be installed. Here are the detailed steps
Follow the steps mentioned onscreen to install SAS. Having VirtualBox and local install could sometime be tricky. We recommend AWS installation-
AWS Installation
You can deploy SAS in AWS. It’s eligible for free tier.
Step 1) Go to https://aws.amazon.com/marketplace/pp/B00WH10IKW. Click “Continue to Subscribe”
Step 2) In this next screen, Accept Terms.
Step 3) The subscription is pending takes up to 10 minutes to approve. You will see the following screen.
Step 4) Refresh the page, and you will subscription confirmed. Click on Continue to Configuration
Step 5) Keep settings default and click Continue to Launch.
Step 6) Review the config page. Enter a key-value pair. Rest settings should be the default. Click Launch
Step 7) Go to https://aws.amazon.com/marketplace/library/ and click on View Instances.
Step 8) In the popup
- 1. Note the instance id. This is your password
- 2. Click Access software
Step 9) In the popup, that appears after you click in step 8
- 1. Enter user credentials. Id: sasdemo password: instance id noted in step 8
- 2. Click Sign in
Step 10) You will see the welcome screen.
Troubleshooting
If you are not able to connect, go to https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#SecurityGroups:sort=groupId and inbound/outbound rules to all
How to Use SAS?
To effectively use SAS software you need to follow four steps which are: Access Data, Management Data, Analyze, Present
Access Data:
SAS allows you to access data in any desired format that you want.
You can access data that is stored anywhere, whether it is in a file on your system or data that is stored in another database system. It can be oracle file, SAS database file, Raw Database file or a simple XLS /CSV file. It will help you to access this data with ease.
Manage Data:
SAS offers great data management capabilities. You can subset/slice data based on certain conditions, create variable, clean & validate data. There are other tools which allow you to perform the same task. However, SAS helps you to perform this job with ease.
SAS has well-defined libraries and processes which makes the programming process easy. Moreover, creating variable or subset data is just one step process. This saves you from writing complex algorithms by just a single line of code.
Analyze:
You can do various kinds of analyze using SAS:
- It checks Frequency of Mean calculation
- Regression and Forecasting
- Decision Tree
All these analyzes can easily handle by SAS. It is the best tool for accurate forecasting.
Present:
If you visualize data correctly, it is effortless for the audience to relate to it. It is essential that your tool present the data in a suitable manner. That’s what SAS does for you. It has excellent presentation capabilities.
You can:
1. 1. List reports
2. 2. Summary reports
3. 3. Graph reports
4. 4. Print reports
SAS Program Example
SAS Program consists of three necessary steps:
- Data Step
- Proc Step
- Output Step
DATA Step:
Data step loads the needed data set into SAS memory and finds the correct variables of the data set. It also captures the records. We can use data steps to:
- 1. Enter data into SAS data sets
- 2. Compute Values
- 3. Check or correct data
- 4. Produce new data sets
The syntax for DATA statement is:
Syntax
- DATA data_set_name; #Give a name to the dataset
- INPUT var1,var2,var3; #Declare variables in the dataset.
- NEW_VAR; #Define new variables.
- LABEL; #Give variables a label
- DATALINES; #Provide data
- RUN;
Example:
Following example show how to define a variable, naming the data set, creating new variables and entering the data. In this example, you can see that string variable have a $ at the end, and numeric values are without it.
- INPUT ID $ NAME $ SALARY DEPARTMENT $;
- comm = SALARY*1.50;
- LABEL ID = ‘Emp_ID’ comm = ‘COMMISION’;
- DATALINES;
- 1 Tom 5000 IT
- 2 Harry 6000 Operations
- 3 Michelle 7000 IT
- 4 Dick 8000 HR
- 5 John 9000 Finance
- ;
- RUN;
Note : To execute SAS Statement need to specify the RUN command.
PROC Step
It performs specific analysis or functions to produce results and reports.
Syntax
- PROC procedure_name options; #The name of the proc.
- RUN;
Example
The given example uses the MEANS procedure to print the mean values of the numeric variables in the data set.
- PROC MEANS;
- RUN;
The OUTPUT Step
You can display the data from the data with conditional output statements.
Syntax
- PROC PRINT DATA = data_set;
- OPTIONS;
- RUN;
Every SAS program must follow all the above mentions steps to read the input data, analyzing the data and giving the output of the analysis. The RUN statement at the end of each step finishes the execution of that step.
The complete SAS Program
Below given is the complete code for each of the above steps.
Output:
SAS Applications : SAS initially designed to complete statistical analysis but now it is also used for analytics. It is mainly used for processing complex raw data into meaningful information. This meaningful information helps an institution to make better decisions. It is also helpful to us to compile, analyze and extract data from various resources. It does the processing, cleaning, digging, and packaging for statistical people.
In general, the SAS tool is playing a crucial role in statistical analysis and decision-making. But here we are presenting some specific fields that primarily use the SAS software.
1. Multivariate Analysis : Multivariate Analysis is used to analyze multiple elements or variables at the same time. SAS investigate the relationship among various variables without categorising them as dependent or independent. It uses different studies that reflect the effect of variable factors on a single result. It includes analysis of factor, bivariate, and many regressions.
2. Business Intelligence : Business intelligence is associated with the technologies and strategies that are used by any enterprise for data analysis of business information. Analysis of data helps the senior team by providing the scope of decision making. It also provides intuition regarding current, predictive and historical views of business working.
3. Predictive Analytics : Predictive analytics uses statistical algorithms, data and machine learning to identify the possibility of future outcomes based on historical data. As the name suggests, Predictive analytics uses already available data for future prediction. There are various statistical techniques to draw inferences for the prediction.For example, a product of a company continues the trend in sales over the last few years, by analyzing the sales data of the product, it is predicted that the demand of the product will not change. Now, if another product of the same company continuous the sales trend of changing demand every month, by analyzing all the factors such as reason behind variation, conclusions, customer feedback process, It is predicted that there is high risk in the product. In the case of such products, historical data cannot be used for sales prediction.
4. Clinical Research and Forecasting : In the field of medicine, there are revolutionary changes due to SAS. It is used in the diagnostic decision-making system. SAS helps in critical decision making such as in diagnosis and prognosis, both are vital elements of medicine and must be precise and accurate. SAS is used to see if patients are at risk or not. SAS tool is even used in finding little chances which can improve the condition of a patient.
Where is SAS used?
Below given are some important SAS applications:
Industry | Usage |
---|---|
Pharmaceutical | Statistical Analysis, Reporting |
Telecom | ETL, Reporting, Data Mining, Forecasting |
Financials | ETL, Reporting, Data Mining, Financial research |
Predictive modeling | DBMarketing, Activity-Based Management |
Healthcare | ETL, reporting, Data Mining |
SAS Vs. R
SAS | R |
---|---|
SAS is commercial software, so it requires a financial investment. | R is open source software. Hence anyone can use it. |
SAS is an easiest analytical tool to learn. Even people with limited knowledge of SQL can learn it quickly. | R requires you to write complicated and lengthy codes. |
SAS is a highly preferred choice by big companies and is quite technically advanced & user-friendly. | R is fast developing software; however, you need to keep upgrading it. |
SAS has good graphical support but does not offer any customization. | Graphical support of R tool is very poor. |
Advantages of SAS
- SAS has an easy syntax which can be learned without any type of programming knowledge
- Ability to handle a large database with ease
- SAS is a very comprehensible language which can easily be debugged
- Its “log” window clearly states the error which helps you to debug your code easily
- SAS helps you thoroughly test and analyze the algorithm
- SAS is completely secured so you can’t extract without a license in the office
- Makes statistical computing easier for the non-programming users
- Handles large size database effectively.
Disadvantages of SAS
- Cost is high because individual or organization can’t use it all applications without a proper license
- SAS is not open source so, algorithms used in SAS are not available for common use
- Text mining is a very troublesome and difficult process in SAS.
Are you looking training with Right Jobs?
Contact Us- Msbi Tutorial
- Apache Spark & Scala Tutorial
- Tableau Tutorial
- Advanced SAS Interview Questions and Answers
- Python vs R vs SAS
Related Articles
Popular Courses
- Alteryx Training
11025 Learners
- Qlik Sense Training
12022 Learners
- RapidMinerTraining
11141 Learners
- What is Dimension Reduction? | Know the techniques
- Difference between Data Lake vs Data Warehouse: A Complete Guide For Beginners with Best Practices
- What is Dimension Reduction? | Know the techniques
- What does the Yield keyword do and How to use Yield in python ? [ OverView ]
- Agile Sprint Planning | Everything You Need to Know