Aan introduction to SAS, one of the more frequently used statistical packages in business. With hands-on exercises, explore SAS's many features and learn how to import and manage datasets and and run basic statistical analyses. This is an introductory workshop appropriate for those with little or no experience with SAS.
Complete workshop materials include demo SAS programs available at http://projects.iq.harvard.edu/rtc/sas-intro
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
This document provides an overview of SAS (Statistical Analysis Software). It describes how SAS can handle large datasets with millions or billions of records. It also lists some common SAS modules and provides examples of DATA and PROC steps to create and process SAS datasets. Finally, it discusses the SAS programming environment and how to submit and run SAS programs.
SAS is a software suite for advanced analytics. It was developed in the 1960s and includes components for statistical analysis, graphics, predictive modeling, and more. The main components of SAS are the data step for data manipulation and procedure steps for analysis. Common procedures include PROC PRINT, PROC MEANS, PROC FREQ and PROC REG. SAS programs are written in the SAS code editor and results are displayed in the SAS results window.
htttps://www.smartprogram.in/sas
Learn SAS programming, SAS slides, SAS tutorials, SAS certification, SAS Sample Code, SAS Macro examples,SAS video tutorials, SAS ebooks, SAS tutorials, SAS tips and Techniques, Base SAS and Advanced SAS certification, SAS interview Questions and answers, Proc SQL, SAS syntax, Advanced SAS
- PROC TABULATE creates customized tables that display descriptive statistics from SAS data. It allows users to classify and analyze variables to produce one, two, or three-dimensional tables.
- The procedure uses CLASS, VAR, and TABLE statements to specify how variables should be classified, analyzed, and presented in the table. Common statistics like frequency, mean, sum can be calculated and displayed.
- Two-way and multi-dimensional tables can be created to examine relationships between multiple variables. Formatting and summary options provide flexibility in customizing table output.
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
This document provides an introduction and outline for using SAS software. It covers basic SAS windows and rules, loading and viewing data, manipulating data by selecting subsets, adding or deleting variables, sorting, summarizing data with procedures, and creating plots and outputting results to Word. Examples are provided for common procedures like SORT, MEANS, UNIVARIATE, FREQ, CORR and PLOT. Practice exercises are included to try these skills on a sample dataset.
This document provides an introduction to SAS (Statistical Analysis System) including data management and analysis. It covers general topics such as the SAS interface, programs, data libraries and help/documentation. Specific techniques are explained like importing external data, combining and subsetting datasets, and commonly used functions. The document also gives examples of SAS statements for creating and analyzing datasets.
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
This document provides an overview of SAS (Statistical Analysis Software). It describes how SAS can handle large datasets with millions or billions of records. It also lists some common SAS modules and provides examples of DATA and PROC steps to create and process SAS datasets. Finally, it discusses the SAS programming environment and how to submit and run SAS programs.
SAS is a software suite for advanced analytics. It was developed in the 1960s and includes components for statistical analysis, graphics, predictive modeling, and more. The main components of SAS are the data step for data manipulation and procedure steps for analysis. Common procedures include PROC PRINT, PROC MEANS, PROC FREQ and PROC REG. SAS programs are written in the SAS code editor and results are displayed in the SAS results window.
htttps://www.smartprogram.in/sas
Learn SAS programming, SAS slides, SAS tutorials, SAS certification, SAS Sample Code, SAS Macro examples,SAS video tutorials, SAS ebooks, SAS tutorials, SAS tips and Techniques, Base SAS and Advanced SAS certification, SAS interview Questions and answers, Proc SQL, SAS syntax, Advanced SAS
- PROC TABULATE creates customized tables that display descriptive statistics from SAS data. It allows users to classify and analyze variables to produce one, two, or three-dimensional tables.
- The procedure uses CLASS, VAR, and TABLE statements to specify how variables should be classified, analyzed, and presented in the table. Common statistics like frequency, mean, sum can be calculated and displayed.
- Two-way and multi-dimensional tables can be created to examine relationships between multiple variables. Formatting and summary options provide flexibility in customizing table output.
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
This document provides an introduction and outline for using SAS software. It covers basic SAS windows and rules, loading and viewing data, manipulating data by selecting subsets, adding or deleting variables, sorting, summarizing data with procedures, and creating plots and outputting results to Word. Examples are provided for common procedures like SORT, MEANS, UNIVARIATE, FREQ, CORR and PLOT. Practice exercises are included to try these skills on a sample dataset.
This document provides an introduction to SAS (Statistical Analysis System) including data management and analysis. It covers general topics such as the SAS interface, programs, data libraries and help/documentation. Specific techniques are explained like importing external data, combining and subsetting datasets, and commonly used functions. The document also gives examples of SAS statements for creating and analyzing datasets.
This document provides a step-by-step guide to learning SAS. It begins with an introduction to SAS and its windowing environment. Next, it discusses SAS datasets and variables, including importing data into SAS and basic procedures and functions. The document then covers combining datasets in SAS before concluding with next steps. It assumes some basic database and analytics knowledge and provides disclaimers about its intended use as a high-level summary.
In this ppt the viewer will able to understand about SAS software. It is a statistical software suite developed by SAS Institute for data management. SAS was developed at North Carolina State University from 1966 until 1976, when SAS Institute was incorporated. SAS was further developed in the 1980s and 1990s with the addition of new statistical procedures, additional components and the introduction of JMP. A point-and-click interface was added in version 9 in 2004. A social media analytics product was added in 2010.
• Portion explained:
• Components of SAS Software
• Origins of SAS Software
• Development of SAS Software
• Recent History of SAS Software
• Software products of SAS Software
• Adoption of SAS Software
• Application of SAS Software
This document provides an introduction to SAS (Statistical Analysis System). It describes SAS as a combination of statistical software, database management, and programming language. It outlines the history of SAS and its wide usage across various industries like healthcare, finance, retail, and telecom. The document discusses the SAS user interface and basic program structure. It also highlights the benefits of SAS certification.
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
Clinical SAS programming involves managing large datasets with thousands of data points and interdependencies to deliver accurate and reproducible analyses that determine approval of new drug therapies. It requires strong SAS technical skills as well as an understanding of clinical trials, statistics, industry data standards, and soft skills like communication. Learning SAS involves mastering its programming language and data step features like the implied loop and program data vector, as well as tools like macros, PROC procedures, and graphical and statistical procedures.
This document provides instructions for inputting and managing data in SAS. It discusses creating a SAS library to organize data files. Steps are provided to manually create a SAS data set within a library and input data. Importing data from an external file is also mentioned as an alternative to manual input. The document reviews key SAS concepts like librefs and permanent vs temporary libraries.
This document provides a summary of SAS language elements, procedures, functions, formats, and the macro language. It includes brief descriptions of commonly used statements, such as DATA, SET, IF/THEN, FORMAT, and PROC, as well as summaries of various procedures like FREQ, MEANS, REPORT and SORT. It also outlines important macro language elements such as %DO, %LET, and macro quoting functions.
The purpose of this presentation is to describe step by step the transition of a SAS Programmer into a Clinical Statistical Programmer. It can be used as guidelines for SAS Programmers who wants to put their programming and technical expertise into industries.
A SAS Programmer is someone who uses SAS software for different scenarios. The person who uses it for different purposes is known as a SAS Programmer.
On the other hand, a Clinical Statistical Programmer performs all the procedures to generate future outputs and makes advanced and real-world developments to face further challenges. A primary role of Clinical Statistical Programmers is to use their technical and programming skills in order to enable clinical trial statisticians to perform their statistical analysis duties more efficiently.
This presentation will briefly discuss about the smooth transition that a SAS Programmer needs to go through in order to become a Clinical Statistical Programmer.
This presentation is about -
Overview of SAS 9 Business Intelligence Platform,
SAS Data Integration,
Study Business Intelligence,
overview Business Intelligence Information Consumers ,navigating in SAS Data Integration Studio,
For more details Visit :-
http://vibranttechnologies.co.in/sas-classes-in-mumbai.html
This document provides an overview of using SPSS to analyze data. It discusses opening data files in SPSS, viewing the data, entering new data values, setting up variable properties like name, type, and label. It also covers running frequency analyses and descriptive statistics, computing new variables, and concludes that SPSS is a powerful tool for statistical analysis.
SAS is a statistical analysis software primarily used as a data management, statistical analysis, and reporting tool. It was created at North Carolina State University in the late 1960s. The typical SAS workflow involves collecting data from databases, performing analysis and reporting in SAS, and submitting clinical trial data and results to regulatory agencies like the FDA. SAS plays a key role in organizing clinical trial data into CDISC standards like SDTM and ADaM and generating tables, figures, and listings for analysis and regulatory submission.
This document provides an introduction and overview of the SAS statistical software system. It discusses that SAS was originally developed in the 1970s for agricultural research, but is now widely used statistical software. It also summarizes the main SAS product lines, resources for learning SAS including introductory books and online documentation, and provides a basic overview of the SAS programming language including data steps, procedure steps, and accessing SAS.
This document is a study guide for the SAS Institute A00-201 exam. It provides information to help students prepare and pass the exam to become certified in SAS programming. The study guide covers the key topics and concepts that will be tested on the exam in order to obtain the SAS certification.
The concept about SAS software and it high end tools.
Stay connected for SAS programming Keywords.
Please not this uploaded ppt is not a copy right of any anonymous,this were created by Sushil Kasar for his basic learnings' and sharing Knowledge activities.
Regards,
Sushil & team.
Data set options allow features during dataset processing and control variables, observations, security, and attributes. They are specified in parentheses after a SAS data set name and include options like DROP, KEEP, RENAME, FIRSTOBS, and LABEL. Data set options apply to input datasets before programming statements and to output datasets after statements are processed.
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...Edureka!
This SAS Programming For Beginners tutorial from Edureka will take you through the programming concepts in SAS such as data and procedure steps, formats, informats, loops, dataset operations and important procedures like Proc Means, Frequency, Summary and many more. We have implemented a Randomness Testing demo which uses SAS Frequency procedure and Chi Square test to check the randomness of a given sample of data. Below are the topics covered in this tutorial:
1. Data Analytics Tools
2. Why SAS?
3. What is SAS?
4. SAS Features
5. Programming Concepts in SAS
6. Use Case – Testing Randomness
7. SAS Job Trends
SAS Enterprise Guide allows users to perform data analysis tasks like importing, cleaning, visualizing, analyzing and reporting on data through a point-and-click graphical user interface without needing to write SAS code. The document discusses best practices for importing Excel data, permanently storing datasets in libraries, and using Enterprise Guide to perform tasks from importing to reporting while avoiding potential data issues.
This document provides an overview of SAS programming concepts and techniques for working with data. It discusses reading raw data using DATA steps and PROC IMPORT, selecting and transforming data, merging datasets, handling missing values, and working with dates. Functions for character manipulation, arithmetic, ranking and summarizing data are also explained. Overall, the document serves as a helpful cheat sheet for common SAS programming tasks.
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
Learn how to navigate Stata’s graphical user interface, create log files, and import data from a variety of software packages. Includes tips for getting started with Stata including the creation and organization of do-files, examining descriptive statistics, and managing data and value labels. This workshop is designed for individuals who have little or no experience using Stata software.
Full workshop materials including example data sets and .do file are available at http://projects.iq.harvard.edu/rtc/event/introduction-stata
This document provides an introduction to SAS analytics training. It begins with introducing the instructor and their qualifications. It then outlines what will be covered in the training, including an introduction to analytics, the top 5 features of SAS, different types of SAS datasets, how to read data into SAS, and how to plot graphs to understand data. It also discusses what SAS is and why it is widely used, highlighting its maturity, certification programs, product support, and role in large enterprises.
This document provides a step-by-step guide to learning SAS. It begins with an introduction to SAS and its windowing environment. Next, it discusses SAS datasets and variables, including importing data into SAS and basic procedures and functions. The document then covers combining datasets in SAS before concluding with next steps. It assumes some basic database and analytics knowledge and provides disclaimers about its intended use as a high-level summary.
In this ppt the viewer will able to understand about SAS software. It is a statistical software suite developed by SAS Institute for data management. SAS was developed at North Carolina State University from 1966 until 1976, when SAS Institute was incorporated. SAS was further developed in the 1980s and 1990s with the addition of new statistical procedures, additional components and the introduction of JMP. A point-and-click interface was added in version 9 in 2004. A social media analytics product was added in 2010.
• Portion explained:
• Components of SAS Software
• Origins of SAS Software
• Development of SAS Software
• Recent History of SAS Software
• Software products of SAS Software
• Adoption of SAS Software
• Application of SAS Software
This document provides an introduction to SAS (Statistical Analysis System). It describes SAS as a combination of statistical software, database management, and programming language. It outlines the history of SAS and its wide usage across various industries like healthcare, finance, retail, and telecom. The document discusses the SAS user interface and basic program structure. It also highlights the benefits of SAS certification.
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
Clinical SAS programming involves managing large datasets with thousands of data points and interdependencies to deliver accurate and reproducible analyses that determine approval of new drug therapies. It requires strong SAS technical skills as well as an understanding of clinical trials, statistics, industry data standards, and soft skills like communication. Learning SAS involves mastering its programming language and data step features like the implied loop and program data vector, as well as tools like macros, PROC procedures, and graphical and statistical procedures.
This document provides instructions for inputting and managing data in SAS. It discusses creating a SAS library to organize data files. Steps are provided to manually create a SAS data set within a library and input data. Importing data from an external file is also mentioned as an alternative to manual input. The document reviews key SAS concepts like librefs and permanent vs temporary libraries.
This document provides a summary of SAS language elements, procedures, functions, formats, and the macro language. It includes brief descriptions of commonly used statements, such as DATA, SET, IF/THEN, FORMAT, and PROC, as well as summaries of various procedures like FREQ, MEANS, REPORT and SORT. It also outlines important macro language elements such as %DO, %LET, and macro quoting functions.
The purpose of this presentation is to describe step by step the transition of a SAS Programmer into a Clinical Statistical Programmer. It can be used as guidelines for SAS Programmers who wants to put their programming and technical expertise into industries.
A SAS Programmer is someone who uses SAS software for different scenarios. The person who uses it for different purposes is known as a SAS Programmer.
On the other hand, a Clinical Statistical Programmer performs all the procedures to generate future outputs and makes advanced and real-world developments to face further challenges. A primary role of Clinical Statistical Programmers is to use their technical and programming skills in order to enable clinical trial statisticians to perform their statistical analysis duties more efficiently.
This presentation will briefly discuss about the smooth transition that a SAS Programmer needs to go through in order to become a Clinical Statistical Programmer.
This presentation is about -
Overview of SAS 9 Business Intelligence Platform,
SAS Data Integration,
Study Business Intelligence,
overview Business Intelligence Information Consumers ,navigating in SAS Data Integration Studio,
For more details Visit :-
http://vibranttechnologies.co.in/sas-classes-in-mumbai.html
This document provides an overview of using SPSS to analyze data. It discusses opening data files in SPSS, viewing the data, entering new data values, setting up variable properties like name, type, and label. It also covers running frequency analyses and descriptive statistics, computing new variables, and concludes that SPSS is a powerful tool for statistical analysis.
SAS is a statistical analysis software primarily used as a data management, statistical analysis, and reporting tool. It was created at North Carolina State University in the late 1960s. The typical SAS workflow involves collecting data from databases, performing analysis and reporting in SAS, and submitting clinical trial data and results to regulatory agencies like the FDA. SAS plays a key role in organizing clinical trial data into CDISC standards like SDTM and ADaM and generating tables, figures, and listings for analysis and regulatory submission.
This document provides an introduction and overview of the SAS statistical software system. It discusses that SAS was originally developed in the 1970s for agricultural research, but is now widely used statistical software. It also summarizes the main SAS product lines, resources for learning SAS including introductory books and online documentation, and provides a basic overview of the SAS programming language including data steps, procedure steps, and accessing SAS.
This document is a study guide for the SAS Institute A00-201 exam. It provides information to help students prepare and pass the exam to become certified in SAS programming. The study guide covers the key topics and concepts that will be tested on the exam in order to obtain the SAS certification.
The concept about SAS software and it high end tools.
Stay connected for SAS programming Keywords.
Please not this uploaded ppt is not a copy right of any anonymous,this were created by Sushil Kasar for his basic learnings' and sharing Knowledge activities.
Regards,
Sushil & team.
Data set options allow features during dataset processing and control variables, observations, security, and attributes. They are specified in parentheses after a SAS data set name and include options like DROP, KEEP, RENAME, FIRSTOBS, and LABEL. Data set options apply to input datasets before programming statements and to output datasets after statements are processed.
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...Edureka!
This SAS Programming For Beginners tutorial from Edureka will take you through the programming concepts in SAS such as data and procedure steps, formats, informats, loops, dataset operations and important procedures like Proc Means, Frequency, Summary and many more. We have implemented a Randomness Testing demo which uses SAS Frequency procedure and Chi Square test to check the randomness of a given sample of data. Below are the topics covered in this tutorial:
1. Data Analytics Tools
2. Why SAS?
3. What is SAS?
4. SAS Features
5. Programming Concepts in SAS
6. Use Case – Testing Randomness
7. SAS Job Trends
SAS Enterprise Guide allows users to perform data analysis tasks like importing, cleaning, visualizing, analyzing and reporting on data through a point-and-click graphical user interface without needing to write SAS code. The document discusses best practices for importing Excel data, permanently storing datasets in libraries, and using Enterprise Guide to perform tasks from importing to reporting while avoiding potential data issues.
This document provides an overview of SAS programming concepts and techniques for working with data. It discusses reading raw data using DATA steps and PROC IMPORT, selecting and transforming data, merging datasets, handling missing values, and working with dates. Functions for character manipulation, arithmetic, ranking and summarizing data are also explained. Overall, the document serves as a helpful cheat sheet for common SAS programming tasks.
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
Learning
Base SAS,
Advanced SAS,
Proc SQl,
ODS,
SAS in financial industry,
Clinical trials,
SAS Macros,
SAS BI,
SAS on Unix,
SAS on Mainframe,
SAS interview Questions and Answers,
SAS Tips and Techniques,
SAS Resources,
SAS Certification questions...
visit http://sastechies.blogspot.com
Learn how to navigate Stata’s graphical user interface, create log files, and import data from a variety of software packages. Includes tips for getting started with Stata including the creation and organization of do-files, examining descriptive statistics, and managing data and value labels. This workshop is designed for individuals who have little or no experience using Stata software.
Full workshop materials including example data sets and .do file are available at http://projects.iq.harvard.edu/rtc/event/introduction-stata
This document provides an introduction to SAS analytics training. It begins with introducing the instructor and their qualifications. It then outlines what will be covered in the training, including an introduction to analytics, the top 5 features of SAS, different types of SAS datasets, how to read data into SAS, and how to plot graphs to understand data. It also discusses what SAS is and why it is widely used, highlighting its maturity, certification programs, product support, and role in large enterprises.
This document provides an overview and introduction to the SAS statistical software system. It discusses the origins and development of SAS, describes some of the main SAS products and their uses, and provides resources for further learning including introductory books and online materials. The document also outlines the basic structure of SAS programs including data steps, procedure steps, and accessing SAS on UNIX systems. It provides explanations of key concepts such as the structure of the data step and using the INPUT statement.
This document provides a summary of the SAS programming language and various SAS procedures. It describes the basic structure of a SAS job, SAS language elements like statements, comments, and variables. It also summarizes how to work with SAS data sets, the DATA and PROC steps for data manipulation and analysis, and some common statistical and graphical procedures.
R and Stata are both statistical software packages used for data analysis. R is open source and programming based, while Stata has a point-and-click interface and is known for its user-friendly commands. Both packages allow users to import and export data from formats like CSV, SAS, SPSS and each other. They also provide functions for data manipulation, summaries, modeling and graphics.
8323 Stats - Lesson 1 - 03 Introduction To Sas 2008untellectualism
This document provides an introduction to SAS, a statistical software used for business intelligence. It discusses the main programming windows in SAS including the editor, log, and output windows. It also describes how to access and manage SAS datasets by assigning libraries, and how SAS programs are made up of data and proc steps to import data, create and analyze SAS datasets, and produce outputs.
This document provides an overview of SAS data sets and SAS programming. It discusses key concepts such as the two main parts of SAS programs (DATA and PROC steps), characteristics of SAS data sets such as variables and observations, and SAS libraries which are used to store SAS data sets. The document also provides examples of basic SAS code.
I need help with Applied Statistics and the SAS Programming Language.pdfMadansilks
I need help with Applied Statistics and the SAS Programming Language
Solution
Introduction :
All SAS jobs are a sequence of SAS steps, which are
made up of instructions, which are called SAS
statements. There are only two kinds of SAS steps:
DATA steps are used to read, edit, and transform data
(raw data or SAS data files), to prepare SAS data sets,
PROC steps are ready-to-use procedures which
analyze or process SAS data sets. In general, data
must be in a SAS data file before they can be
processed by SAS procedures.
Without going into the details at this time, here is a
skeletal example of a SAS job:
DATA STUDENTS;
INPUT NAME $ 1-14 SEX $ 15
SECTION $ 17-19 GRADE;
DATALINES;
. . . data lines . . .
;
PROC SORT DATA=STUDENTS;
BY SECTION DESCENDING GRADE;
PROC PRINT DATA=STUDENTS;
BY SECTION;
RUN
There are two kinds of SAS data sets: SAS data files (or tables), and SAS data views. A SAS
data file contains: the descriptor portion, which provides SAS procedures and some DATA step
statements with descriptive information (data set attributes and variable attributes) about the data
, and the data portion, a rectangular structure containing the data values, with rows (customarily
called observations), and columns (customarily called variables); and which is passed to most
procedures, observation by observation. A SAS catalog is a type of SAS file which stores many
different types of information used by the SAS System. All SAS files reside in a SAS data
library. The SAS System processes the program in two steps: (1) it compiles the program, and
(2) it executes the program. When the program is compiled, a program data vector (PDV) is
constructed for each DATA step. It is an area of memory which includes all variables which are
referenced either explicitly or implicitly in the DATA step. At execution time, the PDV is the
location where the current working values are stored as they are processed by the DATA step.
Variables are added to the PDV sequentially as they are encountered during parsing and
interpretation of SAS source statements. Each step (DATA or PROC) is compiled and executed
separately, in sequence. And at execution time within each DATA step, each observation is
processed iteratively through all of the SAS programming statements of the DATA step. SAS
procedures (PROCs) are programs that are designed to perform specific data processing and
analysis tasks on SAS data sets. Base/SAS procedures fall into the following categories: SAS
Utilities -- APPEND, CATALOG, CIMPORT, COMPARE, CONTENTS, COPY, CPORT,
DATASETS, DBCSTAB, DISPLAY, EXPLODE, EXPORT, FORMAT, FSLIST, IMPORT,
OPTIONS, PMENU, PRINTTO, RANK, REGISTRY, SORT, SQL, STANDARD,
TRANSPOSE, TRANTAB; Descriptive Statistics -- CORR, FREQ, MEANS, SQL,
SUMMARY, TABULATE, UNIVARIATE; Reporting -- CALENDAR, CHART, FORMS,
MEANS, PLOT, PRINT, REPORT, SQL, SUMMARY, TABULATE, TIMEPLOT.
Creating SAS Data Files Since SAS procedures can operate only on SAS data sets, then the first
step in processing any .
SAS on Your (Apache) Cluster, Serving your Data (Analysts)DataWorks Summit
SAS is a both a Language for processing data and an Application for doing Analytics. SAS has adapted to the Hadoop eco-system and intends to be a good citizen amongst the choices for processing large volumes of data on your cluster. As more people inside an organization want to access and process the accumulated data, the “schema on read” approach can degenerate into “redo work someone else might have done already”.
This talk begins comparing and contrasting different data storage strategies, and describes the flexibility provided by SAS to accommodate different approaches. These different storage techniques are ranked according to convenience, performance, interoperabilty – both practicality and cost of the translation. Techniques considered include:
· Storing the rawdata (weblogs, CSVs)
· Storing Hadoop metadata, then using Hive/Impala/Hawk
· Storing in Hadoop optimized formats (avro, protobufs, RCfile, parquet)
· Storing in Proprietary formats
The talk finishes up discussing the array of analytical techniques that SAS has converted to run on your cluster, with particular mention of situations where HDFS is just plain better than the RDBMS that came before it.
SAS INTERVIEW QUESTIONS AND ANSWERS IN 2022Sprintzeal
SAS is the most well-known Data Analytics device on the lookout. SAS is comparable to all driving devices including R and Python with regards to handling immense measures of information and alternatives for equal calculations.
Universally, SAS is the market chief of inaccessible corporate positions. In India, SAS controls about 70% of the information investigation piece of the pie contrasted with 15% for R. In the event that you are wanting to step your foot in Data Analytics, presently is the opportune time for you to begin with SAS Certification Training. It covers fundamental, moderate and progressed ideas of SAS which diagram’s themes on adding information to SAS, information control, announcing, SQL questions and SAS Macros.
This incorporates questions going from straightforward hypothetical ideas to precarious interview questions which are by and large asked in freshers and experienced SAS software engineers' interview. Presently, let us proceed onward to the absolute most significant SAS Interview Questions and Answers that can be asked in your SAS interview.
This document provides an overview of the Statistical Analysis System (SAS) software. It discusses what SAS is used for, including data management, statistical analysis, reporting, and more. It also covers SAS components and their usage, how to install and use the SAS studio interface, basic SAS syntax like variables and data sets, and common statistical procedures in SAS like PROC MEANS, PROC FREQ, and PROC UNIVARIATE to produce measures, frequencies and graphs.
The document provides an overview of SAS (Statistical Analysis System) software, including its applications, components, and tutorials. Key points include:
- SAS is an integrated suite of software used for data management, reporting, analytics, and more.
- It includes applications for executive information systems, data management, reporting, statistics, forecasting, and more.
- The document provides links to tutorials on base SAS, advanced SAS, macros, and certification preparation.
This document discusses SAS data libraries and how to explore them using PROC CONTENTS. Key points include:
1) SAS data libraries allow you to assign nicknames (librefs) to file paths to reference SAS data sets more efficiently.
2) By default, SAS provides a temporary WORK library and a permanent SASUSER library when a session starts.
3) The LIBNAME statement assigns a libref to a file path, making that library available for referencing data sets.
4) PROC CONTENTS lists information about SAS data sets within a library. The NODS option lists only file names without descriptor details.
The document provides an introduction to the SAS programming environment and basic SAS syntax. It describes the five main windows in SAS - Explorer, Editor, Log, Output, and Results. It outlines some basic SAS syntax rules, including using semicolons to end commands and asterisks to denote comments. It also describes steps for running a SAS program, including opening a sample SAS file, running the code, and checking the log for errors or output. The document provides examples of DATA and PROC steps to work with sample data.
ODAM is an Experiment Data Table Management System (EDTMS) that gives you an open access to your data and make them ready to be mined - A data explorer as bonus
The document provides an overview of using SAS for institutional research. It discusses importing and exporting data, manipulating data using the DATA step, and performing basic statistical analysis using common SAS procedures. The workshop goals are to teach basic SAS programming skills including importing, the DATA step, PROC SORT, exporting, PROC PRINT, PROC FREQ, PROC SUMMARY, and PROC TABULATE in three hours. If time allows, it will also cover macros, creating text files, and email reports.
Easy to use (relative to other systems –Oracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer).
This document provides an outline for a workshop on data management in Stata. The workshop covers topics such as generating and replacing variables, processing data using the "by" command, handling missing values, working with different variable types including dates and times, and merging, appending and summarizing datasets. The workshop is intended to provide an introduction to these core data management tasks in Stata for those with basic knowledge of the software.
Provide an introduction to graphics in Stata. Topics include graphing principles, descriptive graphs, and post-estimation graphs. This is an introductory workshop appropriate for those with little experience with graphics in Stata. Intended for those with basic Stata skills.
All workshop materials including slides, do files, and example data sets can be downloaded from http://projects.iq.harvard.edu/rtc/event/graphing-stata
Topics for the class include multiple regression, dummy variables, interaction effects, hypothesis tests, and model diagnostics. Prerequisites include a general familiarity with Stata, including importing and managing datasets and data exploration, the linear regression model, and the ordinary least squares estimation.
Workshop materials including do files and example data sets are available from http://projects.iq.harvard.edu/rtc/event/regression-stata
Introduces common data management techniques in Stata. Topics covered include basic data manipulation commands such as: recoding variables, creating new variables, working with missing data, and generating variables based on complex selection criteria, merging and collapsing data sets. Intended for users who have an introductory level of knowledge of Stata software.
All workshop materials including slides, do files, and example data sets can be downloaded from http://projects.iq.harvard.edu/rtc/event/data-management-stata
This hands-on R course will guide users through a variety of programming functions in the open-source statistical software program, R. Topics covered include indexing, loops, conditional branching, S3 classes, and debugging. Full workshop materials available from http://projects.iq.harvard.edu/rtc/r-prog
This document outlines an introduction to R graphics using ggplot2 presented by the Harvard MIT Data Center. The presentation introduces key concepts in ggplot2 including geometric objects, aesthetic mappings, statistical transformations, scales, faceting, and themes. It uses examples from the built-in mtcars dataset to demonstrate how to create common plot types like scatter plots, box plots, and regression lines. The goal is for students to be able to recreate a sample graphic by the end of the workshop.
This hands-on R course will demonstrate a variety of statistical procedures using the open-source statistical software program, R. Emphasis is on regression modeling using the Zelig package.
Workshop materials including example data sets and R scripts are available from http://projects.iq.harvard.edu/rtc/r-stats
Introduction to the R Statistical Computing Environmentizahn
Get an introduction to R, the open-source system for statistical computation and graphics. With hands-on exercises, learn how to import and manage datasets, create R objects, and conduct basic statistical analyses. Full workshop materials can be downloaded from http://projects.iq.harvard.edu/rtc/event/introduction-r
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
1. Introduction to SAS
Ista Zahn
Harvard MIT Data Center
March 15th, 2013
The Institute
for Quantitative Social Science
at Harvard University
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 1 / 38
2. Outline
1 Introduction
2 Data Import and Export
3 Descriptive Statistics
4 Variable and Value Labels
5 Data Manipulation
6 Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 2 / 38
3. Introduction
Topic
1 Introduction
2 Data Import and Export
3 Descriptive Statistics
4 Variable and Value Labels
5 Data Manipulation
6 Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 3 / 38
4. Introduction
Documents for Today
Log in
USERNAME: dataclass
PASSWORD: dataclass
Find class materials on th scratch drive
Includes data, presentation slides, exercises
Copy materials to your desktop!
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 4 / 38
5. Introduction
Workshop Description
This is an INTRODUCTION to SAS – assumes no knowledge of SAS!
Not appropriate for people already well familiar with SAS
Learning Objectives:
Import and export data in a varity of formats
Create and use variable and value labels
Perform basic data manipulation
Compoute descriptive statistics
Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 5 / 38
6. Introduction
Why SAS?
If you know SAS, it is likely you will not need any other software
packages
Among the most powerful statistical software packages available
Great user community: macros, websites, etc.
Free online documentation:
http://support.sas.com/documentation/93/ind ex.html
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 6 / 38
7. Introduction
SAS history
SAS was first developed in the 1970’s. The world was a lot different then!
(Image source: http://en.wikipedia.org/wiki/Moore’s_law)
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 7 / 38
8. Introduction
The SAS Environment
Five basic SAS windows:
Results
Explorer
Editor
Log
Output
Set up your SAS window so it fits your own preferences
Viewing options (Windows only):
Window > Tile Vertically
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 8 / 38
9. Introduction
SAS Basics
SAS has point-and-click interfaces, but most users write
command-driven SAS programs
Command syntax is not case sensitive, but file names may be
Commands can run on multiple lines (but you can’t split words across
lines)
Follow every command with RUN ;
Comments can be written as:
/* comment comment comment */ OR
* comment comment comment;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 9 / 38
10. Data Import and Export
Topic
1 Introduction
2 Data Import and Export
3 Descriptive Statistics
4 Variable and Value Labels
5 Data Manipulation
6 Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 10 / 38
11. Data Import and Export
Working With SAS Data
SAS data sets are stored in files on your hard drive, usually with the
extension “.sas7bdat”
Under Unix/Linux SAS data file names must be all lowercase–best to
observe this restriction on Windows as well
In SAS there is no concept of “opening” a data set–Instead we use
libraries to point to directories on the hard drive that contain SAS data
sets
Unless you specify otherwise, SAS copies your data temporarily in a
library called “work”
The work library is temporary, so
use the work library for temporary data sets
create and use your own library for any data you wish to save
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 11 / 38
12. Data Import and Export
Libraries and Datasets
Tell SAS where our data is on our hard drive by creating a library – I’m going
to name my library introSAS and point SAS to the dataSets folder
/* initialize a SAS library in the dataSets folder */
LIBNAME introSAS "C:UsersdataclassDesktopSASintrodataSets";
RUN;
/* list sas datasets in the introSAS library / dataSets folder */
PROC DATASETS library=introSAS;
RUN;
/* initialize a SAS library in the SASintroLib folder */
LIBNAME mylib "C:UsersdataclassDesktopSASintroSASintroLib";
RUN;
/* copy pubschool to the "work" library */
DATA pubschool;
SET "C:UsersdataclassDesktopSASintrodataSetspubschool";
RUN;
The DATA command is actually saving our dataset as a new file called
“pubschool” in the “work” library
The SET command is just telling SAS what dataset to save
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 12 / 38
13. Data Import and Export
What if my file is not a SAS file?
In SAS “import” means “convert to SAS format, copy to library/folder”
Import Stata files with dbms=dta
/* import from stata format */
PROC IMPORT out = pubschool
DATAFILE = "C:UsersdataclassDesktopSASintrodataSetspubschool.dta"
DBMS = dta replace;
RUN;
Importing ASCII files with (e.g.) dbms=csv
/* import csv file */
PROC IMPORT out = pubschool
DATAFILE = "C:UsersdataclassDesktopSASintrodataSets/pubschool.csv"
DBMS = csv replace;
GETNAMES = yes;
DATAROW = 2;
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 13 / 38
14. Data Import and Export
Where is my data?
You can “view” you data in a couple of ways:
Proc contents
/* list contents of pubschool data */
PROC CONTENTS data = pubschool;
TITLE "Public school contents";
RUN;
Data viewer
1 Go to explorer
2 Select your “work” library
3 Click on your dataset (opens in SAS Universal Viewer)
Your dataset is named in the library as “pubschool” because that’s what
you named it when you originally opened the dataset
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 14 / 38
15. Data Import and Export
How do I get my data out of SAS?
In SAS “export” means “convert to a non-SAS format”
Exporting CSV files:
/* export to .csv */
PROC EXPORT data = introSAS.ntcs
OUTFILE = "C:UsersdataclassDesktopSASintroSASintroLibNeighCrime_NEW
DBMS = csv;
RUN;
Exporting tab delimited files:
/* export to tab delimited */
PROC EXPORT data = introSAS.ntcs
OUTFILE = "C:UsersdataclassDesktopSASintroSASintroLibNeighCrime_NEW
DBMS = tab;
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 15 / 38
16. Data Import and Export
Exercise 1: Importing Data
1 Create a library named “mylib” in the SASintroLib folder if it doesn’t
already exist
2 Import the Stata file, “ntcs.dta” to the mylib library
3 Import the ASCII file, “ntcs.csv” to the mylib library
4 Use “proc datasets” to list the datasets in the mylib libary
5 Use “proc contents” to review the data you imported in step 2
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 16 / 38
17. Descriptive Statistics
Topic
1 Introduction
2 Data Import and Export
3 Descriptive Statistics
4 Variable and Value Labels
5 Data Manipulation
6 Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 17 / 38
18. Descriptive Statistics
Means, standard deviations, etc.
Compute averages for q1 and q2 using proc means
/* means of vars q1 and q2 */
PROC MEANS data = pubschool;
VAR q1 q2;
TITLE "Public school means";
RUN;
Compute averages for q1 separately by timezone
/* means separatly by timezone */
/* need to sort first */
PROC SORT data = pubschool;
by timezone;
RUN;
PROC MEANS data = pubschool;
by timezone;
VAR q1;
TITLE "Public school means by timezone";
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 18 / 38
19. Descriptive Statistics
Frequency Tables
Frequency tables for q1 and q2 using proc freq
/* counts of responses to q3, q4, and q5 */
PROC FREQ data = pubschool;
TABLE q3 q4 q5;
TITLE "Public school frequencies";
RUN;
Frequency tables for q1 by timezone
/* counts by timezone */
PROC FREQ data = pubschool;
TABLE q3*timezone;
TITLE "Public school frequencies";
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 19 / 38
20. Descriptive Statistics
Correlation and Regression
We’re interested in looking at the relationship between City Crime Rate
(C_CRIMRT) and Percent of High School Grads in the City (C_HSGRAD)
/* Scatterplot of relationship between high school
graduation rate and crime rate */
PROC GPLOT data = introSAS.ntcs;
PLOT C_HSGRAD * C_CRIMRT;
TITLE "Percent of High School Graduates and Crime Rates";
RUN;
/* correlation between graduation and crime rates */
PROC CORR data = introSAS.ntcs;
VAR C_HSGRAD C_CRIMRT;
TITLE "Percent of High School Graduates and Crime Rates";
RUN;
/* Regression predicting crime rate */
PROC REG data = introSAS.ntcs;
MODEL C_CRIMRT = C_HSGRAD C_PERCAP C_POVRTY;
TITLE "Percent of High School Graduates and Crime Rates";
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 20 / 38
21. Descriptive Statistics
Exercise 2: Correlation and regression
Use the ntcs data set
1 Take a look around the ntcs dataset and identify an outcome you’d like
to predict and few variables (4-6) that you believe would serve as
relevant predictor variables
2 Run relevant descriptive statistics on your variables and look at
histograms and scatterplots
3 Test correlations leading up to ultimately testing a regression
4 Run and interpret a regression using your selected variables
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 21 / 38
22. Variable and Value Labels
Topic
1 Introduction
2 Data Import and Export
3 Descriptive Statistics
4 Variable and Value Labels
5 Data Manipulation
6 Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 22 / 38
23. Variable and Value Labels
Variable and Value Labels
Variable labels refer to the titles associated with each variable
Value labels refer to the titles you assign to the different levels (i.e.,
values) of each variable
EXAMPLE:
Variable name: Marital
Variable label: Marital status of participant
Value labels: 1 = Married, 2 = Separated, 3= Divorced, 4 = Single, etc.
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 23 / 38
24. Variable and Value Labels
Variable Labels
Adding variable labels is a data step command:
/* copy pubschool to pubschool2 and label resp and status */
DATA pubschool2;
SET pubschool;
LABEL
resp = "Participant Identifier"
status = "Did participant complete survey?"
RUN;
/* Check output */
PROC CONTENTS data = pubschool2;
TITLE "pubschool2 contents";
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 24 / 38
25. Variable and Value Labels
Creating Value Labels
Creating value labels is a proc command
Start by creating the label format
/* create value label named q1label */
PROC FORMAT;
VALUE q1label
1 = "best"
2 = "top 5"
3 = "top 10"
4 = "top 20"
5 = "Bottom 80"
9 = "Don’t know";
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 25 / 38
26. Variable and Value Labels
Using Value labels
Now we can use this value scheme creating tables,output, etc.
/* display fequencies, using value labels */
PROC FREQ data = pubschool;
TABLES q1;
FORMAT q1 q1label.;
RUN;
/* NOTE: There is a "." after q1label. This alerts SAS
that you’re referring to a value scheme Saving Value
Labels in your Dataset */
We can also save a value label in a data set,
/* add value label to SAS data set */
PROC DATASETS library = work;
MODIFY pubschool2;
format q1 q1label.;
RUN;
/* confirm that our formats were correctly applied: */
PROC FREQ data = pubschool2;
TABLES q1 q3;
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 26 / 38
27. Variable and Value Labels
Dropping and Renaming Variables
Keeping a subset of variables is simple–use the “drop” or “keep” command:
/* create new dataset "pubschoolKeep" with only q1-q5 */
DATA pubschoolKeep (keep = q1 q2 q3 q4 q5);
SET pubschool;
RUN;
/* create new dataset pubschoolDrop, excluding q1-q5 */
DATA pubschoolDrop (drop = q1 q2 q3 q4 q5);
SET pubschool;
RUN;
Renameing variables is done in a data step: just put the rename syntax right
after your data command
/* change the name of q2 to q2newName */
DATA pubschool2 (rename = (q2 = q2newName));
SET pubschool2;
RUN;
/* View the dataset: */
PROC CONTENTS data = pubschool2;
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 27 / 38
28. Variable and Value Labels
SAS variable names
Must be <= 32 characters in length
Must start with a letter or underscore
Can contain only numbers, letters or underscores
No special characters: @#$%^&*
Can contain upper and lowercase letters
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 28 / 38
29. Data Manipulation
Topic
1 Introduction
2 Data Import and Export
3 Descriptive Statistics
4 Variable and Value Labels
5 Data Manipulation
6 Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 29 / 38
30. Data Manipulation
Logic Statements Useful For Data Manipulation
= (EQ) equal to
=
(NE ) not equal to
> (GT) greater than
< (LT) less than
>= (GE) greater than or equal to
<= (LE) less than or equal to
(AND) and
| (OR) or
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 30 / 38
31. Data Manipulation
Generate New Variables
A data command - simply put new variable name followed by variable
condition.
DATA pubschool2;
SET pubschool;
/* create variable "myvar" equal to q1 */
myvar = q1;
/* create variable newvar2 equal to 1 */
newvar2 = 1;
RUN;
Create new variable based on values of existing variable
/* generate newvar4 based on q1 */
DATA pubschool2;
SET pubschool;
if q1=1 then newvar3=1;
else if q1=2 then newvar3=2;
else if q1=3 then newvar3=3;
else if q1=4 then newvar3=4;
else newvar3=.;
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 31 / 38
32. Data Manipulation
Saving Subsets of Data
Subsets are created with in a data step
Create a subset of data including only participants who had a child
attending a public school
/* keep only rows where q10 is 1 */
DATA CurrentPublic;
SET pubschool;
if q10=1;
RUN;
Create a subset of data including participants in timezone 1 or 2
/* keep only rows where timezone is 1 or 2 */
DATA CurrentPublic;
SET pubschool;
if timezone=1 | timezone=2;
RUN;
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 32 / 38
33. Data Manipulation
Missing Values
SAS’s symbol for a missing value is “.”
SAS interprets “.” as a small value
Need to be aware of this when you are manipulating data!
What will happen when you use the < or <= commands?
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 33 / 38
34. Data Manipulation
Exercise 3: Data Manipulation
Use the ntcs.sas7bdat
1 Attach variable labels using the following codebook: // REGION =
“Region in United States”, CITY = “Name of City and State”
2 Create formats in SAS using the codebook below:
C_SOUTH: 1 = Southern City, 0=Non-Southern City
C_WEST: 1=Western City 0=Non-Western City
3 Run “proc freq” on C_SOUTH and C_WEST and use formats from
step 2
4 Assign the formats for C_SOUTH and C_WEST permanently in your
ntcs dataset
5 Confirm with “proc freq” that your labels were correctly assigned
6 Generate new variables based on the city-level crime variables
“C_MURDRT” and “C_ROBBRT”. Choose values on which to
dichotomize each variable and create new variables that have a score of
“1” if the original variable is above that value, and a score of “0”
otherwise.
7 Confirm that your new variables were properly created using “proc freq”
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 34 / 38
35. Wrap-up
Topic
1 Introduction
2 Data Import and Export
3 Descriptive Statistics
4 Variable and Value Labels
5 Data Manipulation
6 Wrap-up
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 35 / 38
36. Wrap-up
Help us make this workshop better!
Please take a moment to fill out a very short feedback form
These workshops exist for you – tell us what you need!
http://tinyurl.com/akyvzle
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 36 / 38
37. Wrap-up
Other Services Available
Institute for Quantitative Social Science
www.iq.harvard.edu
Computer labs
www.iq.harvard.edu/facilities
Research Technology Consulting
www.iq.harvard.edu/researchconsulting
Training
http://projects.iq.harvard.edu/rtc/filter_by/workshops
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 37 / 38
38. Wrap-up
Additional Resources
How do I get SAS?
Your Department IT
HMDC labs
RCE (Research Computing Environment)
Buy it: educational or grad plan
The RCE
Research Computing Enviroment (RCE) service available to Harvard &
MIT users
www.iq.harvard.edu/research_computing
Supplies persistent desktop environment accessible from any computer
with an internet connection
Includes SAS, Stata, R etc.
Ista Zahn (Harvard MIT Data Center) Introduction to SAS March 15th, 2013 38 / 38