{"id":25032,"date":"2021-03-03T09:37:00","date_gmt":"2021-03-03T04:07:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/"},"modified":"2022-10-24T21:07:04","modified_gmt":"2022-10-24T15:37:04","slug":"sas-tutorial-a-beginners-guide","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/","title":{"rendered":"SAS Tutorial: A Beginner\u2019s Guide"},"content":{"rendered":"\n<p><strong>OVERVIEW<\/strong><\/p>\n\n\n\n<p>SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc. Any professionals or students with little or no programming experience can learn SAS, as it\u2019s easy to learn and also over the years SAS has added numerous solutions in big data analytics, Predictive analytics, Fraud management, Health science analytics which makes SAS as an asset in many jobs markets.&nbsp;<\/p>\n\n\n\n<p>In this article, you will get to understand the flow of SAS programming and its important concepts which will help the new users, beginners or any professional to acquire quick knowledge of Base SAS programming steps in less time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"introduction\"><strong>INTRODUCTION<\/strong><\/h2>\n\n\n\n<p><strong>SAS<\/strong> <strong>(Statistical Analysis Software)<\/strong> is a software developed in the year 1960 by the SAS Institute. It is one of the most popular software in the field of analytics. Useful for the following purposes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Data management, Data mining\u00a0<\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-statistical-analysis\/\">Statistical analysis<\/a>, business modelling.<\/li>\n\n\n\n<li>Report writing and Graphics.<\/li>\n\n\n\n<li>Data extraction<\/li>\n\n\n\n<li>Data transformation<\/li>\n\n\n\n<li>Data update and modification<\/li>\n\n\n\n<li>Business Intelligence<\/li>\n\n\n\n<li>Operations Research and Project Management\u00a0<\/li>\n<\/ul>\n\n\n\n<p>SAS software suite has more than 200<sup> <\/sup>components&nbsp;some important and in-demand SAS components and their usage listed below:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>SAS components<\/strong><\/td><td><strong>Usage<\/strong><\/td><\/tr><tr><td><strong>Base SAS<\/strong><\/td><td>Data management, data analysis and reporting.<\/td><\/tr><tr><td><strong>SAS\/STAT<\/strong><\/td><td>Statistical analysis and modelling<\/td><\/tr><tr><td><strong>SAS\/GRAPH<\/strong><\/td><td>Graphs, Charts and Plots<\/td><\/tr><tr><td><strong>SAS\/ETS<\/strong><\/td><td><a href=\"https:\/\/en.wikipedia.org\/wiki\/Econometrics\" target=\"_blank\" rel=\"noreferrer noopener\">Econometrics<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Time_Series_Analysis\" target=\"_blank\" rel=\"noreferrer noopener\">Time Series Analysis<\/a><\/td><\/tr><tr><td><strong>SAS\/PH<\/strong><\/td><td><a href=\"https:\/\/en.wikipedia.org\/wiki\/Clinical_trial\" target=\"_blank\" rel=\"noreferrer noopener\">Clinical trial<\/a>&nbsp;analysis<\/td><\/tr><tr><td><strong>Enterprise Miner<\/strong><\/td><td>Data mining<\/td><\/tr><tr><td><strong>Enterprise Guide<\/strong><\/td><td>GUI based code editor &amp; project manager<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sas-installation\"><strong>SAS INSTALLATION<\/strong><\/h2>\n\n\n\n<p>SAS Software is available for free both offline and online to learn Base SAS programming.<\/p>\n\n\n\n<p>The following two ways you can access SAS software.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><br><strong>SAS University Edition<\/strong><br>Installation RequiredRun on local machine (laptop \/ Desktop)No Internet Required<br><br><br><br><br><br><br>Link is here:<a href=\"https:\/\/www.sas.com\/en_in\/software\/university-edition\/download-software.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.sas.com\/en_in\/software\/university-edition\/download-software.html<\/a><br><strong>Please read the requirement details before you start downloading.<\/strong><\/td><td><br><strong>SAS OnDemand for Academics<\/strong><br>No Installation Required. Set up your account by registering yourselfYou can access it from anywhere as it is run on cloudInternet RequiredIt is available for everyone not just college students.&nbsp;Link is here:https:\/\/www.sas.com\/en_in\/software\/on-demand-for-academics.html&nbsp;&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>SAS can run on any operating system either Linux or Windows. SAS is driven by SAS programmer who use several sequences of operations on the SAS datasets to make proper reports for data analysis. Mostly SAS uses on Windows in organization or institute but some organizations prefer Linux but there is no graphical user interface and you have to write code for every query. Windows SAS have a lot of utilities which help programmers very much in writing codes and in saving time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sas-interface-and-library\"><strong>SAS INTERFACE AND LIBRARY<\/strong><\/h2>\n\n\n\n<p>In this article, I will be using SAS windowing environment interface to make you understand the SAS programming structure and syntax. You might get SAS studio interface after installing SAS university edition in your system or in online SAS academic cloud-based access. There are little differences in interface between SAS windows and SAS studio else all the syntaxes and functionality is the same. You can follow all the below programs in SAS studio environment with the same syntaxes.<\/p>\n\n\n\n<p>After installation of SAS software you will get the working windows which will help you to write the programs, to view the program execution and results.&nbsp;<\/p>\n\n\n\n<p>Let\u2019s understand what are those working windows that SAS provides to work on.&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p><strong>3.1 SAS interface have five important windows:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Code\/Editor window<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Editor window is that part of SAS where we write all the codes.&nbsp;<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Log window<\/strong><\/li>\n<\/ol>\n\n\n\n<p>A log window is like an execution window where we can check the execution of the SAS program. In this window we can check the errors also. It is very important to check every time the log window after running the program. So that we can have proper understanding about the execution of our program.<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Output window<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Output window is the result window where we can see the output of our program.<\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Result window<\/strong><\/li>\n<\/ol>\n\n\n\n<p>It is like an index to all the outputs. All the programs that we have run in one session of the SAS are listed there and you can open the output by clicking on the output result. But these are mentioned only in one session of the SAS. If we close the software and then open it then the Result Window will be empty.<\/p>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Explore window<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Here all the libraries listed. You can also browse your system SAS supported files from here.<\/p>\n\n\n\n<p><strong>3.<\/strong><strong>2 <\/strong><strong>SAS Library:<\/strong><\/p>\n\n\n\n<p>SAS libraries are the storage in SAS which can be Temporary storage or Permanent storage. In short SAS libraries are of two type <strong>1- Temporary library<\/strong> (Work library or Default library) and <strong>2- Permanent library<\/strong>.<\/p>\n\n\n\n<p><strong>Let\u2019s get dive more in detail about SAS libraries<\/strong><strong>:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Temporary or Work Library<\/strong><br><\/td><td>It\u2019s by-default library in SAS.&nbsp;All the datasets are stored in the work library, if we do not assign any library <strong>(<\/strong><strong><em>libref<\/em><\/strong><strong>)<\/strong> name.All the store dataset in work library will be temporary. i.e. if we end the SAS session the dataset get deleted.&nbsp;Can check work library in the explore window.&nbsp;Dataset which is in work library will be either one-level name or two-level name.&nbsp;<strong>Example: ABCD [one-level name] or Work.ABCD [Two-level name]<\/strong>Here <strong>work<\/strong> is library name, <strong>ABCD<\/strong> is dataset &nbsp; name. If we don\u2019t define Work as a library SAS will automatically store ABCD dataset in work library.&nbsp;Must use (<strong>.<\/strong>) period sign between library and dataset name.<\/td><\/tr><tr><td><strong>Permanent Library&nbsp;<\/strong><br><br><\/td><td>Permanent library can be assigned by using key word <strong>LIBNAME.<\/strong>User have to create library by using SAS utilities or by writing the codes in the editor window.After you end your SAS session, the contents of a permanent library still exist in the physical location.Permanent library dataset name will always have <strong>Two-level name.&nbsp;<\/strong><strong>Example: NewLib.ABCD [Two-level name]&nbsp;&nbsp;<\/strong>Here <strong>NewLib<\/strong> is a permanent library <strong><em>(libref<\/em><\/strong><strong>)<\/strong> assign to the ABCD dataset.Must use (<strong>.<\/strong>) period sign between library and dataset name.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>SAS Library naming rules<\/strong><strong>:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>LIBNAME<\/strong> = Key word for assigning a library.<\/li>\n\n\n\n<li><strong><em>libref<\/em><\/strong> = a valid SAS beginning with either a letter or an underscore and having not more than 8 characters.\u00a0<\/li>\n\n\n\n<li><strong><em>SAS-library<\/em><\/strong>= the path and name of the directory enclosed in quotes.<\/li>\n\n\n\n<li>End the statement with semicolon <strong>(;)<\/strong><\/li>\n\n\n\n<li>Run is an optional, as <strong><em>Libname<\/em><\/strong> is a global statement so it can be executed without <strong>run.<\/strong>\u00a0<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sas-terminology-and-data-structure\"><strong>SAS TERMINOLOGY AND DATA STRUCTURE&nbsp;<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>DATASET: <\/strong>Dataset or Table is a combination of rows and columns<strong>. <\/strong>It is a collection of observations.\u00a0\u00a0<\/li>\n\n\n\n<li><strong>OBSERVATION<\/strong>: In a dataset an observation or row is a data values associated with a particular record.<\/li>\n\n\n\n<li><strong>VARIABLE:<\/strong> In a dataset a variable or column is a set of data values that describes a given attribute. Two main types of variable in SAS: <strong>numeric and character<\/strong><\/li>\n\n\n\n<li>Use <strong>$ sign<\/strong> for character variable identification\u00a0<\/li>\n\n\n\n<li><strong>DATA VALUE:<\/strong> The basic unit of information.\u00a0<\/li>\n\n\n\n<li>In dataset the default value for numeric variables is <strong>(.) period sign.<\/strong><\/li>\n\n\n\n<li>In dataset the default value for character variables is <strong>( ) blank space.<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>Sample Dataset<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sas-naming-rules-and-syntax\"><strong>SAS NAMING RULES AND SYNTAX<\/strong><\/h2>\n\n\n\n<p>Like other programming language, the SAS language also has its own rules of syntax to create the SAS programs. The Three components of any SAS program- Variables, Datasets and SAS statements follows the rules on syntax.<\/p>\n\n\n\n<p>Let\u2019s understand the SAS variable, dataset naming rules and basic of SAS language before we write our first SAS code.<\/p>\n\n\n\n<p><strong>SAS Variables Naming:&nbsp;<\/strong><\/p>\n\n\n\n<p>SAS variables represent column in SAS dataset. The following rules must follow in naming variables.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Must begin with a letter (A-Z, a-z) or an underscore (_).\u00a0<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Can continue with any combination of number or letter like \u2013 (A-Z, a-z), (_) or (0-9).<\/li>\n\n\n\n<li>It can be up to or between 1 - 32 characters long.\u00a0<\/li>\n\n\n\n<li>Characters after the first may be letters, digits or underscores. Example: NAME, _NAME_, FILE1, _NULL_ etc.<\/li>\n\n\n\n<li>Variable names are case-insensitive.<\/li>\n<\/ul>\n\n\n\n<p><strong>SAS Dataset Naming:&nbsp;<\/strong><\/p>\n\n\n\n<p>The following rules must be in mind before giving the name to a dataset.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Must begin with a letter (A-Z, a-z) or an underscore (_).\u00a0<\/li>\n\n\n\n<li>Can continue with any combination of number or letter like \u2013 (A-Z, a-z), (_) or (0-9).<\/li>\n\n\n\n<li>It can be up to or between 1 - 32 characters long<\/li>\n\n\n\n<li>Examples: _File1234, Newlib<strong>.<\/strong>_File1234, PG_Rated_Movies.<\/li>\n\n\n\n<li>In example dataset name without library and (<strong>.<\/strong>) period sign indicates a temporary dataset name whereas dataset name with library (Newlib) and (<strong>.<\/strong>) period sign indicates permanent dataset name.<\/li>\n<\/ul>\n\n\n\n<p><strong>SAS Language:&nbsp;<\/strong><\/p>\n\n\n\n<p>We must understand the basic of SAS language before jump into writing any SAS statements.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SAS statements are free format, means that it can begin and end anywhere either in one line or in multiple line.<\/li>\n\n\n\n<li>SAS statements end with a semicolon (<strong>;<\/strong>) which marks the end of the statement.\u00a0<\/li>\n\n\n\n<li>SAS statement began with any key word like- DATA, PROC, LIBNAME, TITLE etc.<\/li>\n\n\n\n<li>SAS keywords are case-insensitive.<\/li>\n\n\n\n<li>SAS statement are of two types: 1- SAS statements that are used in DATA step or PROC step. 2- SAS statement that are global in scope and can be used anywhere in a SAS program like- LIBNAME, TITLE, OPTIONS, FOOTNOTE.<\/li>\n\n\n\n<li>Must use the RUN statement at the end of the SAS statement.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"sas-file-extensions\"><strong>SAS File Extensions<\/strong><\/h3>\n\n\n\n<p>The SAS programs, data files and the results of the programs are saved with various extension\u2019s system.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>*.sas-<\/strong> It represents the SAS code file which can be edited using the SAS editor.<\/li>\n\n\n\n<li><strong>*.log-<\/strong> It represents the SAS log file which contains information\u2019s such as error, warning and dataset details for a submitted SAS program.<\/li>\n\n\n\n<li><strong>*.sas7bdat- <\/strong>It represents SAS data file which contains as SAS dataset including variable, observations, labels.<\/li>\n<\/ul>\n\n\n\n<p><strong>SAS Comments:<\/strong><\/p>\n\n\n\n<p>Comments in SAS is a message to brief about the programming done by the programmer. Comments in SAS code are specified in two ways. These two formats are below.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>*comment here; \u00a0 <\/strong>Comment can be mention in the form of *comment;\u00a0 it can be in multiple lines and can be of any length.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example- *My First Programming;&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\/*comment here*\/ - <\/strong>Comment in the form of \/*comment here*\/ is more frequently used it can also be in multiple lines and can be of any length<\/li>\n<\/ul>\n\n\n\n<p><strong>Example- \/*This is a comment for the SAS program*\/&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/*This is my first SAS program *\/&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>Comments in SAS<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sas-programming-flow\"><strong>SAS PROGRAMMING FLOW<\/strong><\/h2>\n\n\n\n<p>A SAS programs is a sequence of steps which can be DATA step, PROC step or combination of DATA and PROC step to get the desire output. The following steps perform in any successful execution of a SAS program.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A program first involves in reading raw data (.xlsx, .csv, .txt, .access), dataset (.sas7bdat) etc.<\/li>\n\n\n\n<li>After import of data files now comes the role of DATA step which used to create new SAS datasets for manipulating, evaluating and computing data.<\/li>\n\n\n\n<li>Now the newly created dataset is ready which have our desire and require data values only after validation and manipulation.<\/li>\n\n\n\n<li>PROC step is a procedure step are used to generate list and summary report.\u00a0<\/li>\n<\/ul>\n\n\n\n<p>Below flowchart shows the steps for SAS program execution. Every SAS program must have all these steps to complete reading the input data file, analyzing the data and giving the require output of the analysis.<\/p>\n\n\n\n<p><strong>SAS programming Flow&nbsp;<\/strong><\/p>\n\n\n\n<p>Importing raw data file, managing data by Data step and generating reports by Proc step is a broad topic. In this article I will discuss the important and useful SAS import procedure, data and proc step syntaxes by programming example.&nbsp;<\/p>\n\n\n\n<p>So, let\u2019s get started by writing SAS program!!&nbsp; I will be using \u201c<strong><em>Italic font<\/em><\/strong>\u201d for SAS keywords.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"reading-raw-data\"><strong>&nbsp;READING RAW DATA<\/strong><\/h2>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Import raw data by IMPORT procedure:<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/strong>&nbsp;<strong>The basic of \u201c<\/strong><strong><em>PROC IMPORT\u201d<\/em><\/strong><strong>-&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The import procedure reads data from an external data source and writes it to a data set.<\/li>\n\n\n\n<li>The import procedure can import delimited flies (blank, comma, or tab), Excel files.<\/li>\n\n\n\n<li>The import procedure generates the specified output SAS data set and writes information about the import to the SAS log file\u00a0<\/li>\n<\/ul>\n\n\n\n<p><strong>&nbsp;SYNTAX-&nbsp;<\/strong><\/p>\n\n\n\n<p><strong><em>PROC IMPORT DATAFILE<\/em><\/strong><strong>= \u2018filename\u2019 <\/strong><strong><em>OUT<\/em><\/strong><strong>=SAS-dataset <\/strong><strong><em>DBMS<\/em><\/strong><strong>=identifier &nbsp; &nbsp; <\/strong><strong><em>REPLACE<\/em><\/strong><strong>;<\/strong><\/p>\n\n\n\n<p><strong><em>GETNAME<\/em><\/strong><strong>=YES\/ NO;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In \u201cfilename\u201d specify the complete path for the input PC file.<\/li>\n\n\n\n<li>In\u00a0 \u00a0 SAS-dataset the output will be gets generated, must specify the one-level or two-level (library and data set) SAS name.<\/li>\n\n\n\n<li>In DBMS specifies the type of data to import like DBMS= XLSX, DBMS=CSV,\u00a0 DBMS=DLM<\/li>\n\n\n\n<li>REPLACE option overwrites an existing SAS data set if the same name data set present in the library.<strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong><\/li>\n\n\n\n<li>GETNAMES=Yes \/ No - Is an optional statement to declare first row in the output dataset as a variable name.\u00a0<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 1: Importing an Excel file<\/strong><\/p>\n\n\n\n<p><strong>proc<\/strong> <strong>import<\/strong> datafile='E:\\PRACTICAL_EXAMDATA\\INPUT\\boot.xlsx' out=newlib.bootData<\/p>\n\n\n\n<p>dbms=excel replace;<\/p>\n\n\n\n<p>getnames=yes;<\/p>\n\n\n\n<p><strong>run<\/strong>;<\/p>\n\n\n\n<p><strong>Importing Excel file data in SAS dataset<\/strong><\/p>\n\n\n\n<p>In Example-1 Proc import procedure executed to import <strong>\u201cboot.xlsx\u201d<\/strong> excel data file in permanent library <strong>Newlib<\/strong> by using <strong>DBMS= excel<\/strong> type data with option Replace and <strong>Getnames=Yes<\/strong> in editor window. After the successful program runs and executed, its process information get generated in the log window.<\/p>\n\n\n\n<p><strong>Example 2: Importing a CSV file&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>proc<\/strong> <strong>import<\/strong> datafile='E:\\PRACTICAL_EXAMDATA\\INPUT\\new_hires.csv'&nbsp;<\/p>\n\n\n\n<p>out=newlib.hireData<\/p>\n\n\n\n<p>dbms=CSV replace ;<\/p>\n\n\n\n<p>getnames=yes;<\/p>\n\n\n\n<p><strong>run<\/strong>;<\/p>\n\n\n\n<p><strong>Importing CSV file data in SAS dataset<\/strong><\/p>\n\n\n\n<p>In Example-2 Proc import procedure executed to import <strong>\u201cnew_hires.csv <\/strong>data file in permanent library <strong>Newlib.hiredata <\/strong>dataset by using <strong>DBMS=CSV<\/strong> data type with option of <strong>Replace <\/strong>and <strong>Getnames=Yes<\/strong> in editor window. The successful program runs and get executed, its process information generated in the log window.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"data-step-statement\"><strong>DATA STEP STATEMENT<\/strong><\/h2>\n\n\n\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/strong><strong>The basic of \u201c<\/strong><strong><em>DATA STEP\u201d<\/em><\/strong><strong>-&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DATA STEP is a key word use to create SAS dataset\u00a0<\/li>\n\n\n\n<li>Use to read and modify data.\u00a0\u00a0<\/li>\n\n\n\n<li>Use to defining the variables<\/li>\n\n\n\n<li>Reads input files<\/li>\n\n\n\n<li>Creating new variables<\/li>\n\n\n\n<li>Assigning values to the variables<\/li>\n<\/ul>\n\n\n\n<p><strong>8.1- <\/strong><strong>Creating new Dataset<\/strong><\/p>\n\n\n\n<p><strong>SYNTAX -<\/strong><\/p>\n\n\n\n<p><strong><em>DATA<\/em><\/strong><strong>&nbsp; dataset name;&nbsp;<\/strong><\/p>\n\n\n\n<p><strong><em>SET <\/em><\/strong><strong>&nbsp;dataset name;&nbsp;&nbsp;&nbsp;&nbsp;<\/strong><\/p>\n\n\n\n<p>sas statement (option)<\/p>\n\n\n\n<p><strong>Run ;<\/strong><\/p>\n\n\n\n<p>Where<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>dataset name in DATA statement is the name of the SAS dataset to be created (Output Data set).<\/li>\n\n\n\n<li>dataset name in SET statement is the name of the SAS dataset to be read (Input Data set \/ Source data set).<\/li>\n\n\n\n<li>SAS statement (option) is an optional statement can be use in creating, modifying, updating etc.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 3: Creating new data set using DATA step and SET statement&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>Data<\/strong> New_Hires;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>Set&nbsp; Newlib.hiredata;&nbsp;<\/p>\n\n\n\n<p><strong>run<\/strong>;<\/p>\n\n\n\n<p>In Example-3 the <strong><em>DATA<\/em><\/strong><strong> <\/strong>statement tells SAS to name the new data set, <strong>New_Hires<\/strong> and store it in the temporary library work. The <strong><em>SET<\/em><\/strong><strong> <\/strong>statement in the <strong><em>DATA<\/em><\/strong><strong> <\/strong>step specifies the input data set <strong>newlib<\/strong><strong>.<\/strong> <strong>Hiredata<\/strong> (two-level name) and the result output stores in the <strong>New_hires<\/strong> in work library.<\/p>\n\n\n\n<p><strong>8.2 <\/strong><strong>Using Subsetting <\/strong><strong><em>IF<\/em><\/strong><strong> statement<\/strong><\/p>\n\n\n\n<p>The Subsetting <strong><em>IF<\/em><\/strong><em> <\/em>statement causes the <strong><em>DATA<\/em><\/strong><strong> <\/strong>step to continue processing only those observations that meet the conditions of the expression specified in the<em> <\/em><strong><em>IF<\/em><\/strong><strong> <\/strong>statement. The resulting SAS dataset contain a subset of the original external file or SAS dataset.<\/p>\n\n\n\n<p><strong>SYNYAX-<\/strong><\/p>\n\n\n\n<p><strong><em>DATA<\/em><\/strong><strong>&nbsp; data-set name;&nbsp;<\/strong><\/p>\n\n\n\n<p><strong><em>SET <\/em><\/strong><strong>&nbsp;data-set name;&nbsp;&nbsp;&nbsp;&nbsp;<\/strong><\/p>\n\n\n\n<p><strong><em>IF expression<\/em><\/strong><strong> \u2026.;<\/strong><\/p>\n\n\n\n<p><strong>Run ;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When <strong><em>IF <\/em><\/strong>expression is true, the DATA step continues to process that observation.<\/li>\n\n\n\n<li>When<strong><em> IF <\/em><\/strong>expression is false, no further statement are processed for that observation, and control returns to the top of the DATA step.<\/li>\n\n\n\n<li><strong><em>IF<\/em><\/strong> statement works for both Character and Numeric variables.<\/li>\n\n\n\n<li>Can use the <strong>Comparison operators<\/strong> or symbol with <em>IF <\/em>statement.\u00a0<\/li>\n\n\n\n<li><strong>Operators like<\/strong><strong><em> = (equal to), ^= (not equal), > (greater than), &lt; (less than), >= (greater than or equal to), &lt;= (less than or equal to).<\/em><\/strong><\/li>\n\n\n\n<li>Enclose the character value in quotation marks. <strong>Like- <\/strong><strong><em>IF<\/em><\/strong><strong> name=\u2019John\u2019;<\/strong>\u00a0<\/li>\n\n\n\n<li>No need to use the quotation marks with numeric values. <strong>Like- <\/strong><strong><em>IF <\/em><\/strong><strong>income>20000;<\/strong><\/li>\n\n\n\n<li>Must use the value exactly as it appears in the data set.<\/li>\n\n\n\n<li>For selecting multiple observations that meet conditions you can use<strong> Logic Operators AND (&amp;), OR (|).<\/strong><\/li>\n\n\n\n<li><strong>OR\u00a0 \u00a0 <\/strong>operator use if either expression is true, then expression is true.<\/li>\n\n\n\n<li><strong>AND <\/strong>operator use if both expressions are true, then expression is true<strong>.<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>Example 4: IF statement&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>Data<\/strong> India_Hires;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>Set&nbsp; Newlib.hiredata;<\/p>\n\n\n\n<p>If country ='India';&nbsp;<\/p>\n\n\n\n<p><strong>run<\/strong>;<\/p>\n\n\n\n<p>In example-4 the <strong><em>DATA<\/em><\/strong><strong> <\/strong>statement tells SAS to name the new data set, <strong>India_Hires<\/strong> and store it in the temporary library work. The <strong><em>IF<\/em><\/strong> statement selects only observations where country is <strong>\u2018India\u2019<\/strong> from data set <strong>NewLib<\/strong><strong>.<\/strong><strong>Hiredata<\/strong> and store in the <strong>India_Hires<\/strong> data set.<\/p>\n\n\n\n<p><strong>Example 5: Selecting multiple observation using <\/strong><strong><em>IF <\/em><\/strong><strong>with<\/strong><strong><em> OR<\/em><\/strong><strong> statement in <\/strong><strong><em>DATA<\/em><\/strong><strong> step.<\/strong><\/p>\n\n\n\n<p>In Example-5 the <strong><em>DATA <\/em><\/strong>statement tells SAS to name the new data set, <strong>India_Fiji<\/strong> and store it in the temporary library work. The <strong><em>IF<\/em><\/strong><em> <\/em>statement selects only observations where country is <strong>\u2018India\u2019<\/strong> or country is <strong>\u2018Fiji\u2019<\/strong> from data set <strong>NewLib<\/strong><strong>.<\/strong><strong>Hiredata<\/strong> and store in the <strong>India_Fiji<\/strong> data set. OR operator works as a logical condition which select both the observations because the given expression is true.<\/p>\n\n\n\n<p><strong>Example 6: Selecting multiple observation using <\/strong><strong><em>IF <\/em><\/strong><strong>with<\/strong><strong><em> AND<\/em><\/strong><strong> statement in <\/strong><strong><em>DATA<\/em><\/strong><strong> step.<\/strong><\/p>\n\n\n\n<p>In Example-6 the <strong><em>DATA<\/em><\/strong><strong> <\/strong>statement tells SAS to name the new data set <strong>Fiji<\/strong> and store it in the temporary library work. The<strong> <\/strong><strong><em>IF<\/em><\/strong> statement selects only observations where country is <strong>\u2018Fiji\u2019<\/strong> with company name <strong>\u2018<\/strong><strong>Magna Ut Corporation'<\/strong> (highlighted in image) from the data set <strong>NewLib.Hiredata<\/strong> and store in the <strong>Fiji <\/strong>dataset. Remaining company name with country <strong>\u2018Fiji\u2019<\/strong> will not store in the output data set <strong>Fiji<\/strong>. Remember While using AND operator both the condition should be true otherwise the dataset result will show 0 observation in the output data set.<\/p>\n\n\n\n<p><strong>8.3 <\/strong><strong>Creating Variables<\/strong><strong>&nbsp;<\/strong><\/p>\n\n\n\n<p>Creating, assigning, calculating and transforming variables in any <strong><em>DATA<\/em><\/strong> step is done by using an assignment statement. The assignment statement is a combination of variable and expression which do not begin with any keyword.&nbsp;<\/p>\n\n\n\n<p><strong>SYNTAX-<\/strong><\/p>\n\n\n\n<p><strong>Variable=expression;<\/strong><\/p>\n\n\n\n<p>Where,&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Variable<\/strong> is any name of new or existing variable<\/li>\n\n\n\n<li><strong>Expression<\/strong> is any valid SAS expression<\/li>\n\n\n\n<li>Operators which can be use-<strong> Comparison operators, Logical operators <\/strong>discussed above <strong>and Arithmetic operators like- * multiplication, \/ division, + addition, - subtraction, ** exponentiation.\u00a0\u00a0\u00a0<\/strong><\/li>\n\n\n\n<li>Value used with an Arithmetic operator is missing, the result of the expression is missing<strong>.\u00a0\u00a0<\/strong><\/li>\n\n\n\n<li>You can use the parentheses to control the order of operations.<\/li>\n<\/ul>\n\n\n\n<p><strong>8.<\/strong><strong>4 &nbsp; LENGTH statement&nbsp;<\/strong><\/p>\n\n\n\n<p>Before assigning variables let\u2019s understand first about how to specify lengths for variables to avoid truncate of variable values.<\/p>\n\n\n\n<p><strong>SYNTAX-<\/strong><\/p>\n\n\n\n<p><strong><em>LENGTH <\/em><\/strong><strong>variable (s) $ length;<\/strong><\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>LENGTH <\/em><\/strong>is a key word<\/li>\n\n\n\n<li><strong>Variable (s)<\/strong><strong><em> <\/em><\/strong>is the name of variable or variables to be assigned a length<\/li>\n\n\n\n<li><strong>$ (dollar sign)<\/strong><strong><em> <\/em><\/strong>while creating character variable.<\/li>\n\n\n\n<li><strong>length<\/strong> is an integer value to specify the length of the variable<strong><em>.\u00a0\u00a0\u00a0<\/em><\/strong><\/li>\n\n\n\n<li><strong><em>LENGTH<\/em><\/strong><strong> <\/strong>statement always to be use before the assignment statement in the <em>DATA<\/em> step<\/li>\n\n\n\n<li>By default, length for a numeric variable is 8 and for character variable is set at the first occurrence of the variable.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 7: Creating a new Variable&nbsp;<\/strong><\/p>\n\n\n\n<p>In Example-7 the <strong><em>DATA<\/em><\/strong> statement tells SAS to name the new data set <strong>India_visit<\/strong> and store it in the temporary library work. Th<strong>e <\/strong><strong><em>LENGTH <\/em><\/strong>declare for character variable country is 6 bytes. Now the assignment statement used below to create a new variable Country and the value assigned for the country variable is <strong>\u2018INDIA\u2019<\/strong> which is six character long and appears in the output data set <strong>Work<\/strong>. <strong>India_visit<\/strong><strong>.<\/strong><\/p>\n\n\n\n<p><strong>Example 8: Calculations using an Assignment statement<\/strong><\/p>\n\n\n\n<p>In Example-8 the <strong><em>DATA<\/em><\/strong> statement tells SAS to name the new data set <strong>TotalMarks<\/strong> and store it in the temporary library work. Th<strong>e <\/strong><strong><em>LENGTH <\/em><\/strong>declare for numeric variable <strong>Total<\/strong> and <strong>Average<\/strong> is 5 (By default length is 8). Next, the assignment statement used to create a new variable Total and calculated the sum of all scores, similarly the second variable Average is created and calculated the mean score for each student by using the arithmetic operator, result for total scores and average scores shown in the output data set <strong>Work.totalmarks<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"proc-step-statement\"><strong>PROC STEP STATEMENT<\/strong><\/h2>\n\n\n\n<p><strong>The basic of \u201c<\/strong><strong><em>PROC STEP\u201d<\/em><\/strong><strong>-&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC STEP<\/em><\/strong> is a key word use to create list report\u00a0<\/li>\n\n\n\n<li>Use to create summary report of the analyzed data\u00a0<\/li>\n\n\n\n<li>Generates Output<\/li>\n\n\n\n<li>Produce Plots and Charts<\/li>\n\n\n\n<li>Variables and observations appear in output report in the order in which they occur in the data set.<\/li>\n\n\n\n<li>Can control the order of the variables in report output<\/li>\n<\/ul>\n\n\n\n<p><strong>SYNTAX -<\/strong><\/p>\n\n\n\n<p><strong><em>PROC PRINT DATA=<\/em><\/strong>data set name<strong><em>;<\/em><\/strong><\/p>\n\n\n\n<p><strong>Run;<\/strong><\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC PRINT<\/em><\/strong> is the key word use to generate report.<\/li>\n\n\n\n<li>data set name is the name of the data set to be printed as a report and want to see as an output.<\/li>\n\n\n\n<li><strong>RUN <\/strong>statement is the end of proc statement.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 9: PROC PRINT step<\/strong><\/p>\n\n\n\n<p>In Example-9: The <strong><em>PROC PRINT <\/em><\/strong>statement call on the PRINT procedure and specifies the dataset <strong>Totalmarks<\/strong> to be printed as output report in SAS output window. All observations and variables are printed in the same order in which it appears in the data set below.<\/p>\n\n\n\n<p><strong>Example 10: Selecting Variables in PROC PRINT statement<\/strong><\/p>\n\n\n\n<p>In Example-10: The <strong><em>PROC PRINT <\/em><\/strong>statement print the result of the variable <strong>TOTAL <\/strong>and <strong>AVERAGE<\/strong> only.<\/p>\n\n\n\n<p><strong><em>9.1 WHERE <\/em><\/strong><strong>statement in <\/strong><strong><em>PROC PRINT<\/em><\/strong><\/p>\n\n\n\n<p><strong>SYNTAX -<\/strong><\/p>\n\n\n\n<p><strong><em>PROC PRINT DATA=<\/em><\/strong>data set name<strong><em>;<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>WHERE <\/em><\/strong>where-expression;<\/p>\n\n\n\n<p><strong>Run;<\/strong><\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>WHERE <\/em>statement<em> <\/em>is used for selecting observation as required by specifying conditions.<\/li>\n\n\n\n<li><em>WHERE<\/em> statement works for both Character and Numeric variables.<\/li>\n\n\n\n<li><em>WHERE <\/em>statement can use with <strong>Comparison Operators<\/strong> and <strong>Logic Operators.<\/strong><\/li>\n\n\n\n<li>Enclose the character value in quotation marks. <strong>Like- where name=\u2019Caston\u2019;<\/strong>\u00a0<\/li>\n\n\n\n<li>No need to use the quotation marks with numeric values. <strong>Like- where income>10000;<\/strong><\/li>\n\n\n\n<li>Must use the value exactly as it appears in the data set.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 11: Selecting Observations in PROC PRINT statement with WHERE statement<\/strong><\/p>\n\n\n\n<p>In Example-11: The <strong><em>PROC PRINT <\/em><\/strong>statement print the specify data set <strong>Totalmarks<\/strong> as an output report in SAS output window with the only observations where name is <strong>\u2018KATHY\u2019<\/strong> along with all the variables present in the data set.<\/p>\n\n\n\n<p><strong>Example 12: Selecting multiple Observations by WHERE statement<\/strong><\/p>\n\n\n\n<p>In Example-12: The <strong><em>PROC PRINT <\/em><\/strong>statement print the specify data set <strong>Totalmarks<\/strong> as a report in SAS output window with the observations where name is <strong>\u2018KATHY\u2019<\/strong> and <strong>\u2018MICHAEL\u2019<\/strong> resultant two observations get printed, because OR operator works as a logical condition which allow to select the observations of both conditions specified in statement if true.&nbsp;<\/p>\n\n\n\n<p><strong>Example 13: Selecting Observations by WHERE statement and Comparison Operator<\/strong><\/p>\n\n\n\n<p>In Example-13: The <strong><em>PROC PRINT <\/em><\/strong>statement print the specify data set <strong>Totalmarks<\/strong> as a report in SAS output window with the observations where average is less than 60. As a result, two observations get printed.<\/p>\n\n\n\n<p><strong><em>9.2 - Sorting Data<\/em><\/strong><\/p>\n\n\n\n<p><strong>The basic of \u201c<\/strong><strong><em>PROC SORT\u201d<\/em><\/strong><strong>-&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC SORT<\/em><\/strong> is a key word use to sort the data<\/li>\n\n\n\n<li>Sorting rearrange the observations in a data set<\/li>\n\n\n\n<li>Sorting can do in ascending or descending order<\/li>\n\n\n\n<li>Ascending is by default order to sort the observation.<\/li>\n\n\n\n<li>Can sort by multiple variables<\/li>\n\n\n\n<li>In sort procedure missing values is treated as the smallest possible values<\/li>\n\n\n\n<li>PROC SORT does not generate printed output you have to use PROC PRINT to generate the output.<\/li>\n<\/ul>\n\n\n\n<p><strong>SYNTAX -<\/strong><\/p>\n\n\n\n<p><strong><em>PROC SORT DATA=<\/em><\/strong>data set name<strong><em> &nbsp; OUT=<\/em><\/strong>data set name;<\/p>\n\n\n\n<p><strong>By (descending) &lt;By- variable&gt;;<\/strong><\/p>\n\n\n\n<p><strong>Run;<\/strong><\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC SORT<\/em><\/strong> is the key word use to sort the data<\/li>\n\n\n\n<li><strong><em>DATA= <\/em><\/strong>data set to be read<\/li>\n\n\n\n<li><strong><em>OUT= <\/em><\/strong>data set is an output data set that contains the data in sorted order<\/li>\n\n\n\n<li><strong>By variable<\/strong> in the required BY statement specifies one or more variables whose values are used to sort the data.\u00a0<\/li>\n\n\n\n<li>Descending option in BY statement sorts observations in descending order<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 14<\/strong>:&nbsp; <strong>Sorting Data by Ascending order<\/strong><\/p>\n\n\n\n<p>&nbsp;<strong>Newlib.Review2018 Dataset used for Sorting<\/strong> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Sorted data Output in ascending order<\/strong><\/p>\n\n\n\n<p>In Example 14: <strong><em>PROC SORT<\/em><\/strong> step sort the permanent SAS data set <strong>Newlib.Review2018<\/strong> by the values of the variable Site (default Ascending order) and the <strong><em>OUT<\/em><\/strong>= option creates the temporary data set <strong>AscendingSortData<\/strong> and stores the sorted data. The <strong><em>PROC PRINT<\/em><\/strong> step print the ascendingsortdata dataset in output window<\/p>\n\n\n\n<p><strong>Example 15: <\/strong>&nbsp;<strong>Sorting Data by Descending order<\/strong><\/p>\n\n\n\n<p><strong>Newlib.Review2018 Data set used for Sorting&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sorted data Output in descending order<\/strong><\/p>\n\n\n\n<p>In Example 15: <strong><em>PROC SORT<\/em><\/strong> step sort the permanent SAS data set <strong>Newlib.Review2018<\/strong> by the values of the variable Site in Descending order and the <strong><em>OUT<\/em><\/strong>= option creates the temporary data set <strong>DescendingSortData<\/strong> and stores the sorted data. The <strong><em>PROC PRINT<\/em><\/strong> step print the descendingsortdata dataset in output window<\/p>\n\n\n\n<p><strong>9.3- Grouping Observations in SAS<\/strong><\/p>\n\n\n\n<p><strong>SYNTAX -<\/strong><\/p>\n\n\n\n<p><strong><em>PROC PRINT DATA=<\/em><\/strong>data set name<strong><em>;&nbsp;&nbsp;<\/em><\/strong><\/p>\n\n\n\n<p><strong>By &lt;By- variable&gt;;<\/strong><\/p>\n\n\n\n<p><strong>Run;<\/strong><\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC PRINT <\/em><\/strong>is the key word use to print the data<\/li>\n\n\n\n<li><strong><em>DATA= <\/em><\/strong>data set to be read<\/li>\n\n\n\n<li><strong>By <\/strong>variable specifies the variable that the procedure uses to form BY groups.\u00a0<\/li>\n\n\n\n<li>BY variable must be sorted before grouping the observation<strong>.<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>Example 16: Grouping observation using BY variable<\/strong><\/p>\n\n\n\n<p>Example 16: Two SAS statement is performed 1- <strong><em>PROC SORT<\/em><\/strong>, 2- <strong><em>PROC PRINT. <\/em><\/strong>In<strong><em> PROC SORT<\/em><\/strong> step, sorts the permanent SAS data set <strong>Newlib.Review2018<\/strong> by the values of the variable Site and the <strong><em>OUT<\/em><\/strong>= option creates the temporary data set <strong>SortData<\/strong> and stores the sorted data.&nbsp;<\/p>\n\n\n\n<p>Now, the <strong><em>PROC PRINT<\/em><\/strong> step print the <strong>SortData <\/strong>set in groups by using variable Site and generate the report in the output window.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sas-statistics\"><strong>SAS STATISTICS&nbsp;<\/strong><\/h2>\n\n\n\n<p>Statistical procedures in SAS are used to perform the Descriptive and Inferential statistics to analyze the data by Mean, Standard deviation, Frequency distributions, amount of missing data, Skewness, variability, TTest, Correlation, Linear regression etc.<\/p>\n\n\n\n<p>Let\u2019s explore some important statistical procedure useful for data analysis.<\/p>\n\n\n\n<p><strong><em>10.1 <\/em><\/strong><strong><em>PROC MEANS&nbsp;<\/em><\/strong><\/p>\n\n\n\n<p><strong>The basic of \u201c<\/strong><strong><em>PROC MEANS\u201d<\/em><\/strong><strong>-&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC MEANS<\/em><\/strong> is a keyword use to compute descriptive statistics for numeric variables across all observations and within the group of observations.\u00a0<\/li>\n\n\n\n<li>Can calculate <strong>mean, median, mode, standard deviation, minimum, maximum, total observations, missing values, variance, kurtosis, skewness, confidence limit<\/strong><strong><em>.<\/em><\/strong><\/li>\n\n\n\n<li>If you do not specify any statistics-keyword Options with proc means, <strong>MEANS<\/strong> will print the <strong>N<\/strong>- number of non-missing values, <strong>Mean<\/strong>- average, <strong>STD<\/strong>-standard deviation, <strong>Min<\/strong>-minimum and <strong>Max<\/strong>-maximum values of all numeric variables, which is default simple statistics mean procedure.<\/li>\n\n\n\n<li>Different statistics options you can request with MEANS procedure like-<\/li>\n<\/ul>\n\n\n\n<p><strong>N<\/strong>- Number of non-missing values&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>MEAN<\/strong>- mean<\/p>\n\n\n\n<p><strong>MEDIAN- <\/strong>the median&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>STDDEV<\/strong>-standard deviation<\/p>\n\n\n\n<p><strong>MIN<\/strong>-minimum &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>MAX<\/strong>-maximum<\/p>\n\n\n\n<p><strong>SUM<\/strong>- Sum&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>RANGE<\/strong>-range value<\/p>\n\n\n\n<p><strong>NMISS<\/strong>- Number of missing value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>MODE<\/strong>- mode<\/p>\n\n\n\n<p><strong>SYNTAX -<\/strong><\/p>\n\n\n\n<p><strong><em>PROC MEANS DATA=<\/em><\/strong>data set name &lt;statistics-keyword Options&gt;<strong><em>;&nbsp;&nbsp;<\/em><\/strong><\/p>\n\n\n\n<p><strong>CLASS;<\/strong><\/p>\n\n\n\n<p><strong>VAR;<\/strong><\/p>\n\n\n\n<p><strong>Run;<\/strong><\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC MEANS <\/em><\/strong>is the key word use to calculate the descriptive statistics.<\/li>\n\n\n\n<li><strong><em>DATA= <\/em><\/strong>data set to be read<\/li>\n\n\n\n<li><strong>CLASS <\/strong>statement uses for grouping the observation (optional).\u00a0<\/li>\n\n\n\n<li><strong>VAR<\/strong> is the variable name from the data set (optional)<strong>.<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>Example 17:&nbsp; SAS Means procedure<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In Example 17: <strong><em>PROC MEANS <\/em><\/strong>procedure is used to compute summary statistics for all numeric variables presented in the dataset <strong>Newlib.helath.<\/strong><\/li>\n\n\n\n<li><strong><em>PROC MEANS<\/em><\/strong> procedure printed the <strong>N<\/strong>- number of non-missing values, <strong>Mean<\/strong>- average, <strong>STD<\/strong>-standard deviation, <strong>Min<\/strong>-minimum and <strong>Max<\/strong>-maximum values of all numeric variables, which is default statistics by <strong><em>PROC MEANS.<\/em><\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>Example 18:&nbsp; SAS Means procedure with statistical keyword option.<\/strong><\/p>\n\n\n\n<p><strong>Summary statistics&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In Example 18: <strong><em>PROC MEANS <\/em><\/strong>procedure is used to get Mean, Median, Standard deviation, Minimum, Maximum and NMiss value of specify numeric variables of interest presented in SAS dataset <strong>Newlib.health.\u00a0<\/strong><\/li>\n\n\n\n<li>The statistical keywords suppress the default output of <strong><em>PROC MEANS<\/em><\/strong><em> (<\/em>N, mean, std, min and max) and calculated the output of define statistics <strong>Mean, Median, Standard deviation, Minimum, Maximum and NMiss.\u00a0<\/strong><\/li>\n\n\n\n<li>Where<strong> Maxdec<\/strong><strong>=2 <\/strong>keyword used to get only 2 digits after decimal place in the output of define statistics.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 19:&nbsp; SAS Means procedure by Class<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In Example 19: <strong><em>PROC MEANS <\/em><\/strong>procedure is used to get only Mean of the specify variables age and income which is grouped by sex variable<strong>.\u00a0<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Result window shows the output of <strong><em>PROC MEANS<\/em><\/strong> in which variable Sex is having category of 1 and 2 with 4 observations in each.<\/li>\n\n\n\n<li>Mean value of variable Age and Income in each sex group is calculated and the numeric mean value having the maximum digits after decimal place is 2.<\/li>\n<\/ul>\n\n\n\n<p><strong>10.2- SAS Frequency Procedure<\/strong><\/p>\n\n\n\n<p>SAS frequency distribution is a table shows the frequency or count of the data points in a data set.&nbsp; SAS provides a procedure called <strong>PROC FREQ <\/strong>to calculate the frequency distribution of data points in a data set. frequency distribution is of two type 1- One-way frequency distribution, 2- Two- way frequency distribution also called as cross tabulation method.&nbsp;<\/p>\n\n\n\n<p><strong>T<\/strong><strong>he basic of \u201c<\/strong><strong><em>PROC FREQ\u201d<\/em><\/strong><strong>-&nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC FREQ<\/em><\/strong> is a keyword use to compute the Frequency, Percentage, Cumulative frequency and Cumulative percentage of Categorical variables.<\/li>\n\n\n\n<li>To specify the variable to be processed by the <strong><em>FREQ<\/em><\/strong> procedure, include <strong>Table<\/strong> statement.<\/li>\n\n\n\n<li>To suppress the display of cumulative frequencies and cumulative percentage can add <strong><em>NOCUM<\/em><\/strong> keyword option to table.\u00a0<\/li>\n<\/ul>\n\n\n\n<p><strong>SYNTAX -<\/strong><\/p>\n\n\n\n<p><strong><em>PROC FREQ DATA=<\/em><\/strong>data set name<strong><em>;&nbsp;&nbsp;<\/em><\/strong><\/p>\n\n\n\n<p><strong>TABLE <\/strong>variable-combination <strong>\/<\/strong> Option<strong>;<\/strong><\/p>\n\n\n\n<p><strong>Run;<\/strong><\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>PROC FREQ <\/em><\/strong>is the keyword use to calculate the Frequency count and Percentage of the data point.<\/li>\n\n\n\n<li><strong><em>TABLE= <\/em><\/strong>Determines the order of the variables.<\/li>\n\n\n\n<li>Options can be use with freq procedure are:\u00a0<\/li>\n<\/ul>\n\n\n\n<p><strong>CHISQ<\/strong> \u2013 Request chi-square tests<\/p>\n\n\n\n<p><strong>TREND<\/strong>- Request for Cochran-Armitage test for trend analysis&nbsp;<\/p>\n\n\n\n<p><strong>EXACT<\/strong>- Request for Fisher\u2019s exact test<\/p>\n\n\n\n<p><strong>PLCORR<\/strong>-Request polychoric correlation coefficient.&nbsp;<\/p>\n\n\n\n<p><strong>NOCUM<\/strong>- Suppresses printing cumulative frequencies and cumulative percentage<\/p>\n\n\n\n<p><strong>Example 20: One-way frequency distribution&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>Frequency count of the dataset&nbsp;<\/strong><\/p>\n\n\n\n<p>In Example 20: <strong><em>PROC FREQ <\/em><\/strong>SAS<strong><em> <\/em><\/strong>statement produces frequency table of the data set <strong>Newlib.Heart <\/strong>which shows the number of observations, percentage, cumulative frequency and cumulative percentage for each categorical value of variable Survive. You can see the count, percent of patients died and survive in heart data set.<\/p>\n\n\n\n<p><strong>Example 21: Two-way frequency distribution&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>Two-way frequency output<\/strong><\/p>\n\n\n\n<p>In Example 21: <strong><em>PROC FREQ <\/em><\/strong>statement produces two- way frequency distribution or cross-tabulation for the data set <strong>Newlib.Heart <\/strong>which shows the number of observations for each combination of variable Sex by Survive. Inside each cell, SAS prints the frequency, percentage, percentage for that row and percentage for that column. As you can see in the category Sex-1 the count for Died patients is 4 and its percentage is 20 whereas Surv is 5 with percentage 25 similarly in category Sex-2 the count for Died patients is 5 and its percentage is 30 whereas Surv is 5 with percentage 25.<\/p>\n\n\n\n<p>You can use options as mentioned above with the table statement to modify your analysis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sas-ods\"><strong>SAS ODS<\/strong><\/h2>\n\n\n\n<p>ODS stands for <strong>Output Delivery System<\/strong>. It is mostly used to format the output data in appropriate output destination as specified by the SAS user like <strong>HTML, PDF, RTF<\/strong>, <strong>CSV<\/strong>, <strong>WORD <\/strong>etc. It also helps in sharing the output with other platforms and software and can also combine the results from multiple PROC statements in one single file<\/p>\n\n\n\n<p><strong>SYNTAX-<\/strong><\/p>\n\n\n\n<p><strong><em>ODS<\/em><\/strong> outputfileType <strong><em>FILE<\/em><\/strong> = \u201cPath with Output filename\u201d <strong><em>STYLE <\/em><\/strong>= StyleName<strong>;<\/strong><\/p>\n\n\n\n<p><strong><em>PROC <\/em><\/strong>step statement<strong>;<\/strong><\/p>\n\n\n\n<p><strong><em>ODS<\/em><\/strong> outputfileType <strong>CLOSE<\/strong>;<\/p>\n\n\n\n<p>Where,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>ODS<\/em><\/strong> is the key word for along with the file type name.<\/li>\n\n\n\n<li><strong><em>FILE= <\/em><\/strong>file delivery path and file name information<\/li>\n\n\n\n<li><strong><em>STYLE=<\/em><\/strong>File<strong><em> <\/em><\/strong>formatting option which represents one of the in-built styles available in the SAS environment.<\/li>\n\n\n\n<li><strong><em>PROC <\/em><\/strong>step statement\u00a0<\/li>\n\n\n\n<li><strong><em>ODS <\/em><\/strong>filetype with <strong><em>Close<\/em><\/strong> statement for closing and generating the output<\/li>\n<\/ul>\n\n\n\n<p><strong>Example 22:<\/strong> <strong>Creating HTML Output<\/strong><\/p>\n\n\n\n<p><strong>SAS report in .html format open via internet explorer<\/strong><\/p>\n\n\n\n<p>In Example 22: SAS code is executed and creates HTML output using the ODS HTML SAS statement. In the statement <strong><em>ODS <\/em><\/strong>html key word used along with delivering physical file path and name \u2018Report.html\u2019 with style available in SAS system. In between ODS html file and ODS html close <strong><em>PROC<\/em><\/strong> step statement used to generate the output report of the data set Newlib.review2018 in .html format.<\/p>\n\n\n\n<p><strong>Example<\/strong> <strong>23:<\/strong> <strong>Creating PDF Output<\/strong><\/p>\n\n\n\n<p><strong>SAS Report in pdf&nbsp;<\/strong><\/p>\n\n\n\n<p>In Example 23:&nbsp; SAS code is executed and creates PDF output using the <strong><em>ODS PDF<\/em><\/strong> SAS statement. In the statement <strong><em>ODS <\/em><\/strong>pdf key word used along with delivering physical file path and name \u2018Report.PDF\u2019 with style available in SAS system. In between ODS pdf file and ODS pdf close <strong><em>PROC<\/em><\/strong> step statement used to generate the output report of the data set Newlib.review2018 in .pdf format. Along with the Proc step <strong><em>TITLE<\/em><\/strong> and <strong><em>FOOTNOTE<\/em><\/strong> key words are used to mention the title of the report and endnote.<\/p>\n\n\n\n<p>This brings to the end of the blog on SAS Tutorial. Hope this article helps you in understanding the concept of SAS programming. For a detailed course experience, visit Great Learning Academy where you will find <strong><a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/analytics-on-sas\" target=\"_blank\" rel=\"noreferrer noopener\">free courses on SAS<\/a><\/strong> and more.<\/p>\n\n\n\n<p>Keep Learning!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OVERVIEW SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc. Any professionals or students with little or no programming experience can learn SAS, as it\u2019s easy to learn and also over the years SAS has added numerous solutions in big data analytics, Predictive analytics, [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":24943,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[9],"tags":[],"content_type":[],"class_list":["post-25032","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SAS Tutorial for Beginners to Advanced | What is SAS?<\/title>\n<meta name=\"description\" content=\"SAS Tutorial : SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SAS Tutorial: A Beginner\u2019s Guide\" \/>\n<meta property=\"og:description\" content=\"SAS Tutorial : SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-03T04:07:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-24T15:37:04+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1365\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"23 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"SAS Tutorial: A Beginner\u2019s Guide\",\"datePublished\":\"2021-03-03T04:07:00+00:00\",\"dateModified\":\"2022-10-24T15:37:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/\"},\"wordCount\":5516,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/iStock-1194783078-2.jpg\",\"articleSection\":[\"Data Science and Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/\",\"name\":\"SAS Tutorial for Beginners to Advanced | What is SAS?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/iStock-1194783078-2.jpg\",\"datePublished\":\"2021-03-03T04:07:00+00:00\",\"dateModified\":\"2022-10-24T15:37:04+00:00\",\"description\":\"SAS Tutorial : SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/iStock-1194783078-2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/iStock-1194783078-2.jpg\",\"width\":1365,\"height\":768,\"caption\":\"SAAS Tutorial\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sas-tutorial-a-beginners-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data Science and Analytics\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/data-science\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SAS Tutorial: A Beginner\u2019s Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SAS Tutorial for Beginners to Advanced | What is SAS?","description":"SAS Tutorial : SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/","og_locale":"en_US","og_type":"article","og_title":"SAS Tutorial: A Beginner\u2019s Guide","og_description":"SAS Tutorial : SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2021-03-03T04:07:00+00:00","article_modified_time":"2022-10-24T15:37:04+00:00","og_image":[{"width":1365,"height":768,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"23 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"SAS Tutorial: A Beginner\u2019s Guide","datePublished":"2021-03-03T04:07:00+00:00","dateModified":"2022-10-24T15:37:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/"},"wordCount":5516,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg","articleSection":["Data Science and Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/","url":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/","name":"SAS Tutorial for Beginners to Advanced | What is SAS?","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg","datePublished":"2021-03-03T04:07:00+00:00","dateModified":"2022-10-24T15:37:04+00:00","description":"SAS Tutorial : SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg","width":1365,"height":768,"caption":"SAAS Tutorial"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/sas-tutorial-a-beginners-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Data Science and Analytics","item":"https:\/\/www.mygreatlearning.com\/blog\/data-science\/"},{"@type":"ListItem","position":3,"name":"SAS Tutorial: A Beginner\u2019s Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg",1365,768,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2-768x432.jpg",768,432,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg",1365,768,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg",1365,768,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg",640,360,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg",96,54,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/02\/iStock-1194783078-2.jpg",150,84,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"OVERVIEW SAS is the leading analytical software used in a variety of business domains such as Insurance, Healthcare, Pharmacy, Telecom etc. Any professionals or students with little or no programming experience can learn SAS, as it\u2019s easy to learn and also over the years SAS has added numerous solutions in big data analytics, Predictive analytics,&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/25032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=25032"}],"version-history":[{"count":9,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/25032\/revisions"}],"predecessor-version":[{"id":105437,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/25032\/revisions\/105437"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/24943"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=25032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=25032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=25032"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=25032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}