SlideShare a Scribd company logo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What To Expect
• What is Data Analytics?
• Data Analytical Tools
• Why SAS?
• What Is SAS?
• SAS Framework
• SAS Programming
• SAS Applications
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Analytics
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Data Analytics?
Why
Analytics?
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Data Analytics?
Why
Analytics?
Cost
Reduction
Better
Decision
Making
Improved
Services
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Data Analytics?
Why
Analytics?
Cost
Reduction
Better
Decision
Making
Improved
Services
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Data Analytics?
Why
Analytics?
Cost
Reduction
Better
Decision
Making
Improved
Services
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Data Analytics?
Why
Analytics?
Cost
Reduction
Better
Decision
Making
Improved
Services
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Data Analytics?
Data
Knowledge
Clarity
Decisions
Analysis : Store + Organize + Mine
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Analytical Tools
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
There are many tools in the market that perform Data Analytics. The common ones are:
Data Analytical Tools
Apache Spark
Pig
Excel
Python
Hive
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why SAS?
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why SAS?
Ease of Learning
Graphical Capabilities
Advancement in tools
Job Scenario
01
02
03
04
easy
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is SAS?
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is SAS?
SAS? Statistical
Analytics
System
Statistical Package + DBMS + Programming Language
SAS
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Framework
1
2
3
4
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS
1
2
3
4
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Access
Manage
Analyze
Present
Access
SAS gives you excellent data management capabilities
1)Subset Data
2)Create Variables
3)Clean & Validate Data
1
2
3
4
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Frequency or Mean calculation
Regression and Forecasting
SAS is the gold standard for statistical
analysis.
After Data Management the next step is data analysis :
1
2
3
4
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Access
4)Print reports
3)Graph reports
2)Summary reports
1)List reports
Once you have analyzed data you can present it better with SAS
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Programming Language
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Programming Process
Define business problem
Write a SAS program
Run the program
Review the results
Debug or modify
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS programming is based on two building blocks:
1)DATA Steps
DATA steps create or modify SAS data sets. Using DATA steps you can:
• Add data to a data set
• Compute values of variables
• Create new data sets (by sub-setting, merging)
SAS Program Structure
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS programming is based on two building blocks:
2)PROC Steps
PROC steps analyse and process SAS data sets. Using PROC steps you can:
• Print a report
• Produce descriptive analysis
• Create a tabular report
• Produce plots and charts
SAS Program Structure
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Data
Variables
Observations
Data is central to every data set.
• In SAS Data is in tabular form
• Variables occupy the columns
• Observations occupy the rows
Data types:
• Numeric
• Characters
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Data – Informat
Informat
• Informats tell SAS how to read a variable
• Every variable in any SAS dataset will have an informat.
• There are three main classes of informats: character, numeric and date.
Type Informat Name What it does
Character $w. Reads character data of length w
Numeric w.d
Reads numeric data of length w with d
decimal points
Date MMDDYYw. Reads date data in the form MM-DD-YY
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Data - Format
Format
• Formats tell SAS how to display the values in the variable.
• Formats can be grouped three classes (character, numeric, and date-time)
• The general form of a format statement is:
FORMAT variable-name FORMAT-NAME.;
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Data - Date
• Dates in SAS are represented in a special way.
• SAS date = number of days since January 1, 1960.
Date SAS Date Value
January 1, 1959 -365
January 1, 1960 0
January 1, 1961 366
January 1, 2003 15706
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
A SAS program should follow below mentioned rules:
SAS Program Structure
1)Almost every code
begins with a DATA or a
PROC Step
2)Every line of SAS code
ends with a semi colon
3)A SAS code ends with
RUN or QUIT keyword
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Linear Regression
SAS Program
• Establish a relationship between two variables
• Forecast a new observation
Ex: 1) Income and spending
2)Student height and grades
Y = B0 + B1*X
Intercept
Slope
H(0) : B1 = 0 (X and Y are not related)
H(1) : B1 != 0 (X and Y are related)
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Linear Regression in SAS
SAS Program
Data practice1;
input x y;
datalines;
1 10
2 7
3 8
4 5
5 6
5.5 7
7 2
8 3.3
9 1.5
;
proc print;
run;
1) Create a sample data set
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Linear Regression in SAS
SAS Program
2) View Scatter Plot
proc sgscatter data = practice1;
plot x*y;
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Linear Regression in SAS
SAS Program
3) Run linear regression model
proc reg data = practice1;
model y = x / clb;
run;
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Program
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Linear Regression in SAS
SAS Program
4) Create and add new value of x to predict corresponding y
data practice2;
y = .; x = 8.5;
proc print;
run;
data practice1;
set practice1 practice2;
proc print;
run; New value
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Linear Regression in SAS
SAS Program
5) Predict the value of y using the model
proc reg data = practice1;
model y = x/cli;
run;
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Applications
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
SAS Applications
1)Stock Prediction 2)Create Safe Drugs
3)Fight Fraud 4)Optimize Workflow
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Session In A Minute
Data Analytics SAS
SAS Programming Structure Linear regression using SAS Applications of SAS
SAS Framework
What Is SAS | SAS Tutorial For Beginners | SAS Training | SAS Programming | Edureka

More Related Content

What's hot (17)

PDF
Moving to a data-centric architecture: Toronto Data Unconference 2015
Adam Muise
 
PDF
Data Science Crash Course
DataWorks Summit
 
PDF
Manipulating Data with Talend.
Edureka!
 
PPTX
Fighting Financial Crime with Artificial Intelligence
DataWorks Summit
 
PPTX
Evolution of big data
ShilpaKrishna6
 
PPTX
Using SSRS Reports with SSAS Cubes
Code Mastery
 
PDF
Enabling Governed Data Access with Tableau Data Server
Tableau Software
 
PDF
Data Visualization with Tableau - by Knowledgebee Trainings
Ramesh Pabba - seeking new projects
 
PPTX
Intorducing Big Data and Microsoft Azure
Khalid Salama
 
PDF
#dbhouseparty - Graph Technologies - More than just Social (Distancing) Networks
Tammy Bednar
 
PDF
Data Warehouse Design and Best Practices
Ivo Andreev
 
PPT
Tableau PPT Intro, Features, Advantages, Disadvantages
Burn & Born
 
PDF
Tableau And Data Visualization - Get Started
Spotle.ai
 
PDF
Implementing and running a secure datalake from the trenches
DataWorks Summit
 
PDF
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Edureka!
 
PPTX
Tableau overview - EraEdge
EraEdge
 
PPTX
Tableau
Nilesh Patel
 
Moving to a data-centric architecture: Toronto Data Unconference 2015
Adam Muise
 
Data Science Crash Course
DataWorks Summit
 
Manipulating Data with Talend.
Edureka!
 
Fighting Financial Crime with Artificial Intelligence
DataWorks Summit
 
Evolution of big data
ShilpaKrishna6
 
Using SSRS Reports with SSAS Cubes
Code Mastery
 
Enabling Governed Data Access with Tableau Data Server
Tableau Software
 
Data Visualization with Tableau - by Knowledgebee Trainings
Ramesh Pabba - seeking new projects
 
Intorducing Big Data and Microsoft Azure
Khalid Salama
 
#dbhouseparty - Graph Technologies - More than just Social (Distancing) Networks
Tammy Bednar
 
Data Warehouse Design and Best Practices
Ivo Andreev
 
Tableau PPT Intro, Features, Advantages, Disadvantages
Burn & Born
 
Tableau And Data Visualization - Get Started
Spotle.ai
 
Implementing and running a secure datalake from the trenches
DataWorks Summit
 
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Edureka!
 
Tableau overview - EraEdge
EraEdge
 
Tableau
Nilesh Patel
 

Similar to What Is SAS | SAS Tutorial For Beginners | SAS Training | SAS Programming | Edureka (20)

PDF
Sas language reference concepts
imaduddin91
 
PDF
Introduction to-sas-1211594349119006-8
thotakoti
 
PDF
Analytics with SAS
Edureka!
 
PPTX
Sas demo
rvmfinishingschool
 
PDF
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...
Edureka!
 
PPT
BASE SAS Training presentation of coding
shamarites
 
PPTX
Introducción al Software Analítico SAS
Jorge Rodríguez M.
 
PDF
Introduction To Sas
halasti
 
PPT
8323 Stats - Lesson 1 - 03 Introduction To Sas 2008
untellectualism
 
PPTX
BAS 150 Lesson 3 Lecture
Wake Tech BAS
 
DOCX
SAS Programming Notes
Gnana Murthy A
 
PDF
Sharpening Your SAS Skills 1st Edition Sunil Gupta
hemamrsaaban
 
DOC
Sas keyword
a2zonlinetraining
 
PDF
SAS Online Training
revanthonlineenquiry
 
PDF
Sas 913 Language Reference Dictionary 5th Ed Sas Publishing
rahoomityka
 
PDF
Sas summary guide
Ashish K Sharma
 
PDF
Top 140+ Advanced SAS Interview Questions and Answers.pdf
Datacademy.ai
 
PDF
SAS Online Training
Nagendra Kumar
 
DOCX
Sample Questions The following sample questions are not in.docx
todd331
 
Sas language reference concepts
imaduddin91
 
Introduction to-sas-1211594349119006-8
thotakoti
 
Analytics with SAS
Edureka!
 
SAS Training | SAS Tutorials For Beginners | SAS Programming | SAS Online Tra...
Edureka!
 
BASE SAS Training presentation of coding
shamarites
 
Introducción al Software Analítico SAS
Jorge Rodríguez M.
 
Introduction To Sas
halasti
 
8323 Stats - Lesson 1 - 03 Introduction To Sas 2008
untellectualism
 
BAS 150 Lesson 3 Lecture
Wake Tech BAS
 
SAS Programming Notes
Gnana Murthy A
 
Sharpening Your SAS Skills 1st Edition Sunil Gupta
hemamrsaaban
 
Sas keyword
a2zonlinetraining
 
SAS Online Training
revanthonlineenquiry
 
Sas 913 Language Reference Dictionary 5th Ed Sas Publishing
rahoomityka
 
Sas summary guide
Ashish K Sharma
 
Top 140+ Advanced SAS Interview Questions and Answers.pdf
Datacademy.ai
 
SAS Online Training
Nagendra Kumar
 
Sample Questions The following sample questions are not in.docx
todd331
 
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
PDF
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
PDF
Tableau Tutorial for Data Science | Edureka
Edureka!
 
PDF
Python Programming Tutorial | Edureka
Edureka!
 
PDF
Top 5 PMP Certifications | Edureka
Edureka!
 
PDF
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
PDF
Linux Mint Tutorial | Edureka
Edureka!
 
PDF
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
PDF
Importance of Digital Marketing | Edureka
Edureka!
 
PDF
RPA in 2020 | Edureka
Edureka!
 
PDF
Email Notifications in Jenkins | Edureka
Edureka!
 
PDF
EA Algorithm in Machine Learning | Edureka
Edureka!
 
PDF
Cognitive AI Tutorial | Edureka
Edureka!
 
PDF
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
PDF
Blue Prism Top Interview Questions | Edureka
Edureka!
 
PDF
Big Data on AWS Tutorial | Edureka
Edureka!
 
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
PDF
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
PDF
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 

What Is SAS | SAS Tutorial For Beginners | SAS Training | SAS Programming | Edureka

  • 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
  • 2. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What To Expect • What is Data Analytics? • Data Analytical Tools • Why SAS? • What Is SAS? • SAS Framework • SAS Programming • SAS Applications
  • 3. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Analytics
  • 4. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Data Analytics? Why Analytics?
  • 5. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Data Analytics? Why Analytics? Cost Reduction Better Decision Making Improved Services
  • 6. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Data Analytics? Why Analytics? Cost Reduction Better Decision Making Improved Services
  • 7. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Data Analytics? Why Analytics? Cost Reduction Better Decision Making Improved Services
  • 8. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Data Analytics? Why Analytics? Cost Reduction Better Decision Making Improved Services
  • 9. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is Data Analytics? Data Knowledge Clarity Decisions Analysis : Store + Organize + Mine
  • 10. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Analytical Tools
  • 11. Copyright © 2017, edureka and/or its affiliates. All rights reserved. There are many tools in the market that perform Data Analytics. The common ones are: Data Analytical Tools Apache Spark Pig Excel Python Hive
  • 12. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why SAS?
  • 13. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why SAS? Ease of Learning Graphical Capabilities Advancement in tools Job Scenario 01 02 03 04 easy
  • 14. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is SAS?
  • 15. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is SAS? SAS? Statistical Analytics System Statistical Package + DBMS + Programming Language SAS
  • 16. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Framework
  • 17. 1 2 3 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS
  • 18. 1 2 3 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved. Access Manage Analyze Present Access SAS gives you excellent data management capabilities 1)Subset Data 2)Create Variables 3)Clean & Validate Data
  • 19. 1 2 3 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved. Frequency or Mean calculation Regression and Forecasting SAS is the gold standard for statistical analysis. After Data Management the next step is data analysis :
  • 20. 1 2 3 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved. Access 4)Print reports 3)Graph reports 2)Summary reports 1)List reports Once you have analyzed data you can present it better with SAS
  • 21. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Programming Language
  • 22. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Programming Process Define business problem Write a SAS program Run the program Review the results Debug or modify
  • 23. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS programming is based on two building blocks: 1)DATA Steps DATA steps create or modify SAS data sets. Using DATA steps you can: • Add data to a data set • Compute values of variables • Create new data sets (by sub-setting, merging) SAS Program Structure
  • 24. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS programming is based on two building blocks: 2)PROC Steps PROC steps analyse and process SAS data sets. Using PROC steps you can: • Print a report • Produce descriptive analysis • Create a tabular report • Produce plots and charts SAS Program Structure
  • 25. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Data Variables Observations Data is central to every data set. • In SAS Data is in tabular form • Variables occupy the columns • Observations occupy the rows Data types: • Numeric • Characters
  • 26. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Data – Informat Informat • Informats tell SAS how to read a variable • Every variable in any SAS dataset will have an informat. • There are three main classes of informats: character, numeric and date. Type Informat Name What it does Character $w. Reads character data of length w Numeric w.d Reads numeric data of length w with d decimal points Date MMDDYYw. Reads date data in the form MM-DD-YY
  • 27. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Data - Format Format • Formats tell SAS how to display the values in the variable. • Formats can be grouped three classes (character, numeric, and date-time) • The general form of a format statement is: FORMAT variable-name FORMAT-NAME.;
  • 28. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Data - Date • Dates in SAS are represented in a special way. • SAS date = number of days since January 1, 1960. Date SAS Date Value January 1, 1959 -365 January 1, 1960 0 January 1, 1961 366 January 1, 2003 15706
  • 29. Copyright © 2017, edureka and/or its affiliates. All rights reserved. A SAS program should follow below mentioned rules: SAS Program Structure 1)Almost every code begins with a DATA or a PROC Step 2)Every line of SAS code ends with a semi colon 3)A SAS code ends with RUN or QUIT keyword
  • 30. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Linear Regression SAS Program • Establish a relationship between two variables • Forecast a new observation Ex: 1) Income and spending 2)Student height and grades Y = B0 + B1*X Intercept Slope H(0) : B1 = 0 (X and Y are not related) H(1) : B1 != 0 (X and Y are related)
  • 31. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Linear Regression in SAS SAS Program Data practice1; input x y; datalines; 1 10 2 7 3 8 4 5 5 6 5.5 7 7 2 8 3.3 9 1.5 ; proc print; run; 1) Create a sample data set
  • 32. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Linear Regression in SAS SAS Program 2) View Scatter Plot proc sgscatter data = practice1; plot x*y;
  • 33. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Linear Regression in SAS SAS Program 3) Run linear regression model proc reg data = practice1; model y = x / clb; run;
  • 34. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Program
  • 35. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Linear Regression in SAS SAS Program 4) Create and add new value of x to predict corresponding y data practice2; y = .; x = 8.5; proc print; run; data practice1; set practice1 practice2; proc print; run; New value
  • 36. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Linear Regression in SAS SAS Program 5) Predict the value of y using the model proc reg data = practice1; model y = x/cli; run;
  • 37. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Applications
  • 38. Copyright © 2017, edureka and/or its affiliates. All rights reserved. SAS Applications 1)Stock Prediction 2)Create Safe Drugs 3)Fight Fraud 4)Optimize Workflow
  • 39. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Session In A Minute Data Analytics SAS SAS Programming Structure Linear regression using SAS Applications of SAS SAS Framework