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

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