An Introduction to the SAS System

Total Page:16

File Type:pdf, Size:1020Kb

An Introduction to the SAS System An Introduction to the SAS System Dileep K. Panda Directorate of Water Management Bhubaneswar-751023 [email protected] Introduction The SAS – Statistical Analysis System (erstwhile expansion of SAS) - is the one of the most widely used Statistical Software package by the academic circles and Industry. The SAS software was developed in late 1960s at North Carolina State University and in 1976 SAS Institute was formed. The SAS system is a collection of products, available from the SAS Institute in North Carolina. SAS software is a combination of a statistical package, a data – base management system, and a high level programming language. The SAS is an integrated system of software solutions that performs the following tasks: Data entry, retrieval, and management Report writing and graphics design Statistical and mathematical analysis Business forecasting and decision support Operations research and project management Applications development At the core of the SAS System is the Base SAS software. The Base SAS software includes a fourth-generation programming language and ready-to-use programs called procedures. These integrated procedures handle data manipulation, information storage and retrieval, statistical analysis, and report writing. Additional components offer capabilities for data entry, retrieval, and management; report writing and graphics; statistical and mathematical analysis; business planning, forecasting, and decision support; operations research and project management; quality improvement; and applications development. In general, the Base SAS software has the following capabilities A data management facility A programming language Data analysis and reporting utilities Learning to use Base SAS enables you to work with these features of SAS. It also prepares you to learn other SAS products, because all SAS products follow the same basic rules. The SAS products include SAS Foundation 9.2 SAS Enterprise Guide 4.2 SAS OLAP Cube Studio 4.2 SAS Information Map Studio 4.2 SAS Enterprise Miner 6.1 SAS IML Studio SAS BI Server The JMP software (not part of Base SAS) The majority of the enhancements included in SAS 9.2 are a direct response to requests from the users. The Base SAS 9.2 includes more analytical and graphical capabilities such as Base SAS - data management and basic procedures SAS/STAT - statistical analysis SAS/GRAPH - presentation quality graphics SAS/Genetics- Genetics data analysis SAS/OR - Operations research SAS/ETS - Econometrics and Time Series Analysis SAS/IML - Interactive Matrix Language SAS/SQL – Structural Query Language There are other specialized products for access to databases, connectivity between different machines running SAS With the enhancements to SAS Data Integration Studio, you can create and debug jobs more efficiently. In the SAS Business Intelligence applications, all of the user interfaces have been updated to increase productivity and usability. The SAS 9.2 includes significant performance improvements through better use of the underlying hardware and software. The improvements include more widespread use of 64-bit computing, as well as an increased ability to utilize and manage grids. Support for multi-threaded processing has been extended across the platform, from SAS procedures to SAS servers to grid enablement. In addition, new in-database features substantially improve performance by moving analytic tasks closer to your data. 2 An Introduction to the SAS System The SAS Windowing Environment The SAS windowing environment is composed of windows that enable you to accomplish specific tasks. Program Editor enables you to enter, edit, and submit SAS programs. Enhanced Program Editor (available only in the Windows operating environment) enables you to enter, edit, and submit SAS programs. The Editor provides a number of useful editing features such as: colour coding and syntax checking of the SAS language. The initial Editor Window title is Editor - Untitled until you open a file or save the contents of the editor to a file. Then the window title changes to reflect that filename. When the content of the editor is modified, an asterisk is added to the title. Log displays messages about your SAS session and any SAS programs you submit. Output enables you to browse output from SAS programs that you submit. By default, the output window is positioned behind the other windows. When you create output, the Output window automatically moves to the front of your display. Results helps you navigate and manage SAS programs that you submit. You can view, save, or print individual items of output. The window on the left side of the display is the SAS Explorer window, which you can use to assign and locate SAS libraries, files, and other items. The window at the top right is the Log window; it contains the SAS log for the session. The window at the bottom right is the Program Editor window. This window provides an editor in which you edit your SAS programs. Invoke the SAS System and include a SAS program into your session. Submit a program and browse the results. 3 An Introduction to the SAS System Navigate the SAS windowing environment. Program Editor for submitting SAS Programs (New or Existing). Multiple Windows can be opened with different SAS programs Log Window for information about the processing of SAS programs including errors, warnings, time taken etc. Output Window for showing the output produced by SAS programs Data Management Facility SAS organizes data into a rectangular form or table that is called a SAS data set. The following shows a SAS data set. The data describes participants in a 16-week weight program at a health and fitness club. The data for each participant includes an identification number, name, team name, and weight (in U.S. pounds) at the beginning and end of the program. A rectangular form of a SAS Data Set is given by In a SAS data set, each row represents information about an individual entity and is called an observation. Each column represents the same type of information and is called a variable. Each separate piece of information is a data value. In a SAS data set, an observation contains all the data values for an entity; a variable contains the same type of data value for all entities. A SAS program is a sequence of steps that the user submits for execution. DATA steps are typically used to create SAS data sets. PROC steps are typically used to process SAS data sets (that is, generate reports and graphs, edit data, and sort data). To build a SAS data set with Base SAS, you write a program that uses statements in the SAS programming language. A SAS program that begins with a DATA statement and typically creates a SAS data set or a report is called a DATA step. The following SAS program creates a SAS data set named WEIGHT_CLUB from the health club data: data weight_club; 1 input IdNumber 1-4 Name $ 6-24 Team $ StartWeight EndWeight; 2 Loss=StartWeight-EndWeight; 3 datalines; 4 1023 David Shaw red 189 165 5 4 An Introduction to the SAS System 1049 Amelia Serrano yellow 145 124 5 1219 Alan Nance red 210 192 5 1246 Ravi Sinha yellow 194 177 5 1078 Ashley McKnight red 127 118 5 ; 6 run; The following list corresponds to the numbered items in the preceding program: The DATA statement tells SAS to begin building a SAS data set named WEIGHT_CLUB. The INPUT statement identifies the fields to be read from the input data and names the SAS variables to be created from them (IdNumber, Name, Team, StartWeight, and EndWeight). The third statement is an assignment statement. It calculates the weight each person lost and assigns the result to a new variable, Loss. The DATALINES statement indicates that data lines follow. The data lines follow the DATALINES statement. This approach to processing raw data is useful when you have only a few lines of data. (Later sections show ways to access larger amounts of data that are stored in files.) The semicolon signals the end of the raw data, and is a step boundary. It tells SAS that the preceding statements are ready for execution. By default, the data set WEIGHT_CLUB is temporary; that is, it exists only for the current job or session. Programming Language Elements of the SAS Language The statements that created the data set WEIGHT_CLUB are part of the SAS programming language. The SAS language contains statements, expressions, functions and CALL routines, options, formats, and informats - elements that many programming languages share. However, the way you use the elements of the SAS language depends on certain programming rules. The most important rules are listed in the next two sections. Rules for SAS Statements The conventions that are shown in the programs in this documentation, such as indenting of subordinate statements, extra spacing, and blank lines, are for the purpose of clarity and ease of use. They are not required by SAS. There are only a few rules for writing SAS statements: 5 An Introduction to the SAS System SAS statements end with a semicolon. You can enter SAS statements in lowercase, uppercase, or a mixture of the two. You can begin SAS statements in any column of a line and write several statements on the same line. You can begin a statement on one line and continue it on another line, but you cannot split a word between two lines. Words in SAS statements are separated by blanks or by special characters (such as the equal sign and the minus sign in the calculation of the Loss variable in the WEIGHT_CLUB example). Rules for SAS statements SAS names are used for SAS data set names, variable names, and other items. The following rules apply: • Usually consist of Keywords (DATA, PROC etc.); • Always end with a semi-colon (;) • Case InSeNSItive • One or more blank spaces can be used to separate words • Free format – can start, stop anywhere • Single statement can span multiple lines • More than one statement can be on the same line The rules for naming SAS Dataset and variables: A SAS name can contain from one to 32 characters.
Recommended publications
  • Information Technology Laboratory Technical Accomplishments
    CONTENTS Director’s Foreword 1 ITL at a Glance 4 ITL Research Blueprint 6 Accomplishments of our Research Program 7 Foundation Research Areas 8 Selected Cross-Cutting Themes 26 Industry and International Interactions 36 Publications 44 NISTIR 7169 Conferences 47 February 2005 Staff Recognition 50 U.S. DEPARTMENT OF COMMERCE Carlos M. Gutierrez, Secretary Technology Administration Phillip J. Bond Under Secretary of Commerce for Technology National Institute of Standards and Technology Hratch G. Semerjian, Jr., Acting Director About ITL For more information about ITL, contact: Information Technology Laboratory National Institute of Standards and Technology 100 Bureau Drive, Stop 8900 Gaithersburg, MD 20899-8900 Telephone: (301) 975-2900 Facsimile: (301) 840-1357 E-mail: [email protected] Website: http://www.itl.nist.gov INFORMATION TECHNOLOGY LABORATORY D IRECTOR’S F OREWORD n today’s complex technology-driven world, the Information Technology Laboratory (ITL) at the National Institute of Standards and Technology has the broad mission of supporting U.S. industry, government, and Iacademia with measurements and standards that enable new computational methods for scientific inquiry, assure IT innovations for maintaining global leadership, and re-engineer complex societal systems and processes through insertion of advanced information technology. Through its efforts, ITL seeks to enhance productivity and public safety, facilitate trade, and improve the Dr. Shashi Phoha, quality of life. ITL achieves these goals in areas of Director, Information national priority by drawing on its core capabilities in Technology Laboratory cyber security, software quality assurance, advanced networking, information access, mathematical and computational sciences, and statistical engineering. utilizing existing and emerging IT to meet national Information technology is the acknowledged engine for priorities that reflect the country’s broad based social, national and regional economic growth.
    [Show full text]
  • Paquetes Estadísticos Con Licencia Libre (I) Free Statistical
    2013, Vol. 18 No 2, pp. 12-33 http://www.uni oviedo.es/reunido /index.php/Rema Paquetes estadísticos con licencia libre (I) Free statistical software (I) Carlos Carleos Artime y Norberto Corral Blanco Departamento de Estadística e I. O. y D.M.. Universidad de Oviedo RESUMEN El presente artículo, el primero de una serie de trabajos, presenta un panorama de los principales paquetes estadísticos disponibles en la actualidad con licencia libre, entendiendo este concepto a partir de los grandes proyectos informáticos así autodefinidos que han cristalizado en los últimos treinta años. En esta primera entrega se presta atención fundamentalmente al programa R. Palabras clave : paquetes estadísticos, software libre, R. ABSTRACT This article, the first in a series of works, presents an overview of the major statistical packages available today with free license, understanding this concept from the large computer and self-defined projects that have crystallized in the last thirty years. In this first paper we pay attention mainly to the program R. Keywords : statistical software, free software, R. Contacto: Norberto Corral Blanco Email: [email protected] . 12 Revista Electrónica de Metodología Aplicada (2013), Vol. 18 No 2, pp. 12-33 1.- Introducción La palabra “libre” es usada, y no siempre de manera adecuada, en múltiples campos de conocimiento así que la informática no iba a ser una excepción. La palabra es especialmente problemática porque su traducción al inglés, “free”, es aun más polisémica, e incluye el concepto “gratis”. En 1985 se fundó la Free Software Foundation (FSF) para defender una definición rigurosa del sófguar libre. La propia palabra “sófguar” (del inglés “software”, por oposición a “hardware”, quincalla, aplicado al soporte físico de la informática) es en sí misma problemática.
    [Show full text]
  • The Statistics Tutor's Pocket Book Guide
    statstutor community project encouraging academics to share statistics support resources All stcp resources are released under a Creative Commons licence Stcp-marshall_owen-pocket The Statistics Tutor’s Pocket Book Guide to Statistics Resources Version 1.0 Dated 25/08/2016 Please note that if printed, this guide has been designed to be printed as an A5 booklet double sided on A4 paper. © Alun Owen (University of Worcester), Ellen Marshall (University of Sheffield) www.statstutor.ac.uk and Jonathan Gillard (Cardiff University). Reviewer: Mark Johnston (University of Worcester) Page 2 of 51 Contents INTRODUCTION ................................................................................................................................................................................. 4 SECTION 1 MOST POPULAR RESOURCES .................................................................................................................................... 7 THE MOST RECOMMENDED STATISTICS BOOKS ......................................................................................................................................... 8 THE MOST RECOMMENDED ONLINE STATISTICS RESOURCES ........................................................................................................................ 9 SECTION 2 DESIGNING A STUDY AND CHOOSING A TEST ......................................................................................................... 11 DESIGNING AN EXPERIMENT OR SURVEY AND CHOOSING A TEST ...............................................................................................................
    [Show full text]
  • The R Project for Statistical Computing a Free Software Environment For
    The R Project for Statistical Computing A free software environment for statistical computing and graphics that runs on a wide variety of UNIX platforms, Windows and MacOS OpenStat OpenStat is a general-purpose statistics package that you can download and install for free. It was originally written as an aid in the teaching of statistics to students enrolled in a social science program. It has been expanded to provide procedures useful in a wide variety of disciplines. It has a similar interface to SPSS SOFA A basic, user-friendly, open-source statistics, analysis, and reporting package PSPP PSPP is a program for statistical analysis of sampled data. It is a free replacement for the proprietary program SPSS, and appears very similar to it with a few exceptions TANAGRA A free, open-source, easy to use data-mining package PAST PAST is a package created with the palaeontologist in mind but has been adopted by users in other disciplines. It’s easy to use and includes a large selection of common statistical, plotting and modelling functions AnSWR AnSWR is a software system for coordinating and conducting large-scale, team-based analysis projects that integrate qualitative and quantitative techniques MIX An Excel-based tool for meta-analysis Free Statistical Software This page links to free software packages that you can download and install on your computer from StatPages.org Free Statistical Software This page links to free software packages that you can download and install on your computer from freestatistics.info Free Software Information and links from the Resources for Methods in Evaluation and Social Research site You can sort the table below by clicking on the column names.
    [Show full text]
  • Cumulation of Poverty Measures: the Theory Beyond It, Possible Applications and Software Developed
    Cumulation of Poverty measures: the theory beyond it, possible applications and software developed (Francesca Gagliardi and Giulio Tarditi) Siena, October 6th , 2010 1 Context and scope Reliable indicators of poverty and social exclusion are an essential monitoring tool. In the EU-wide context, these indicators are most useful when they are comparable across countries and over time. Furthermore, policy research and application require statistics disaggregated to increasingly lower levels and smaller subpopulations. Direct, one-time estimates from surveys designed primarily to meet national needs tend to be insufficiently precise for meeting these new policy needs. This is particularly true in the domain of poverty and social exclusion, the monitoring of which requires complex distributional statistics – statistics necessarily based on intensive and relatively small- scale surveys of households and persons. This work addresses some statistical aspects relating to improving the sampling precision of such indicators in EU countries, in particular through the cumulation of data over rounds of regularly repeated national surveys. 2 EU-SILC The reference data for this purpose are EU Statistics on Income and Living Conditions, the major source of comparative statistics on income and living conditions in Europe. A standard integrated design has been adopted by nearly all EU countries. It involves a rotational panel, with a new sample of households and persons introduced each year to replace one-fourth of the existing sample. Persons enumerated in each new sample are followed-up in the survey for four years. The design yields each year a cross- sectional sample, as well as longitudinal samples of 2, 3 and 4 year duration.
    [Show full text]
  • Comparison of Three Common Statistical Programs Available to Washington State County Assessors: SAS, SPSS and NCSS
    Washington State Department of Revenue Comparison of Three Common Statistical Programs Available to Washington State County Assessors: SAS, SPSS and NCSS February 2008 Abstract: This summary compares three common statistical software packages available to county assessors in Washington State. This includes SAS, SPSS and NCSS. The majority of the summary is formatted in tables which allow the reader to more easily make comparisons. Information was collected from various sources and in some cases includes opinions on software performance, features and their strengths and weaknesses. This summary was written for Department of Revenue employees and county assessors to compare statistical software packages used by county assessors and as a result should not be used as a general comparison of the software packages. Information not included in this summary includes the support infrastructure, some detailed features (that are not described in this summary) and types of users. Contents General software information.............................................................................................. 3 Statistics and Procedures Components................................................................................ 8 Cost Estimates ................................................................................................................... 10 Other Statistics Software ................................................................................................... 13 General software information Information in this section was
    [Show full text]
  • A Collection of Matlab Functions for the Computation of Elliptical Integrals and Jacobian Elliptic Functions of Real Arguments
    arXiv:1806.10469 [cs.MS] Elfun18 – A collection of Matlab functions for the computation of Elliptical Integrals and Jacobian elliptic functions of real arguments. Milan Batista University of Ljubljana, Faculty of Maritime Studies and Transport, Portorož, Slovenia [email protected] Abstract In the article, we outline the set of Matlab functions that enable the computation of elliptic Integrals and Jacobian elliptic functions for real arguments. Correctness, robustness, efficiency and accuracy of the functions are discussed in some details. An example from the elasticity theory illustrates use of the collection. Key words: special functions, Elliptic integrals, Jacobian elliptical functions, MATLAB 1 Introduction Elfun18 is a collection of the Matlab functions that enable the computation of elliptic Integrals and Jacobian elliptic functions for real arguments. Its purpose is to provide a sufficiently comprehensive set of elliptic integrals and elliptic functions which one can meet in practice. Altogether the collection contains 75 different functions (see Appendix). In particular, the collection covers all elliptic integrals and Jacobian elliptic functions given in [1-5]. Most of these functions are for example included in computer algebra programs Maple and Mathematica and computational environment MATLAB. Also, 1 2 several software libraries include elliptic integrals and elliptic functions (AMath/DAMath0F , BOOST1F , 3 4 5 6 7 8 9 CERN2F , elliptic3F , DATAPLOT 4F , SLATEC5F , Mathematics Source Library6F , MPMATH7F , MATHCW 8F ). However, each of these programs and libraries has its limitations; either in a set of available functions or in the choice of function arguments. The reason for that is probably a maze of possibilities by which one can define elliptic integrals and functions.
    [Show full text]
  • Course Outline
    Course Outline MATH1251 Mathematics for Actuarial Studies and Finance School of Mathematics and Statistics Faculty of Science Semester 2, 2017 Contents 1. Staff ...................................................................................................................................................................4 2. Administrative matters .......................................................................................................................................4 Contacting the Student Services Office .............................................................................................................4 3. Course information ............................................................................................................................................5 3.1 Course summary .........................................................................................................................................5 3.2 Course aims.................................................................................................................................................5 3.3 Course learning outcomes (CLO) ................................................................................................................5 4.1 Learning and teaching activities ......................................................................................................................6 Lecturers & Tutorial Schedule ...........................................................................................................................6
    [Show full text]
  • Categorical Regression (Catreg) User Guide
    EPA/600/R-17/236 June 2017 https://www.epa.gov/bmds CATEGORICAL REGRESSION (CATREG) USER GUIDE VERSION 3.1.0.7 Categorical Regression (CatReg) User Guide TABLE OF CONTENTS 1.0 INTRODUCTION.................................................................................................................................. 5 1.1 About CatReg ............................................................................................................................. 6 1.2 CatReg’s Two Models ................................................................................................................ 6 1.3 CatReg and Toxicology Data ...................................................................................................... 7 1.4 “Concentration” and “Dose” are Equivalent Terms in CatReg ................................................... 8 2.0 INSTALLING CATREG ....................................................................................................................... 9 2.1 Step 1: Meet CatReg System Requirements ............................................................................. 9 2.2 Step 2: Install CatReg ................................................................................................................. 9 3.0 OVERVIEW OF A CATREG SESSION ............................................................................................. 10 4.0 INPUT FILE FORMATTING CHECKLIST ......................................................................................... 12 5.0 DATASET AND VARIABLES TAB ..................................................................................................
    [Show full text]
  • Statistical Analysis Handbook
    Statistical Analysis Handbook A Comprehensive Handbook of Statistical Concepts, Techniques and Software Tools Dr Michael J de Smith Copyright © 2015-2021 All Rights reserved. 2018-2021 Edition. Issue version: 2021-1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except under the terms of the UK Copyright Designs and Patents Act 1998 or with the written permission of the authors. The moral right of the authors has been asserted. Copies of this edition are available in electronic book and web-accessible formats only. Disclaimer: This publication is designed to offer accurate and authoritative information in regard to the subject matter. It is provided on the understanding that it is not supplied as a form of professional or advisory service. References to software products, datasets or publications are purely made for information purposes and the inclusion or exclusion of any such item does not imply recommendation or otherwise of the product or material in question. For more details please refer to the Guide’s website: www.statsref.com ISBN-13 978-1-912556-06-9 Hardback 978-1-912556-07-6 Paperback 978-1-912556-08-3 eBook Published by: The Winchelsea Press, Drumlin Publications, Drumlin Security Ltd, UK Front inside cover image: Polar bubble plot (MatPlotLib, Python) Rear inside cover image: Florence Nightingale's polar diagram of causes of mortality, by month Cover image: Composite image of University
    [Show full text]
  • Chapter Eight Conclusion
    Chapter Eight Conclusion Jorge Luis Romeu IIT Research Institute Rome, NY 13440 June 4, 1999 Executive Summary In this last chapter we summarize what has been accomplished in the areas of statistical analysis of materials data. We also discuss possible topics for future work in the area of statistical training for materials engineers and scientists. Finally, we overview the data sets and software used in the case studies presented. What Has Been Accomplished As we explained in the Introduction chapter, the objective of this SOAR is to provide support and extension materials for better understanding the data analysis statistical procedures in handbooks [6, 7]. It can also be used as reading material by practitioners in statistical analysis, either as a methods refresher or as a discussion on the statistical thinking behind the procedures used in the mentioned handbooks. We have covered several important topics. We have discussed univariate and bivariate statistical methods, for both, qualitative and quantitative variables. We have seen the most important and frequently used statistical distributions in materials data analysis. Among the continuous distributions, we have discussed the Normal, Lognormal and Weibull. Among the discrete distributions we have worked with the Binomial and the Discrete Uniform. We have discussed the meaning, interpretation, use and estimation of distribution parameters and other performance measures of interest. These include measures of central tendency such as the mean, median and mode and measures of dispersion such as the variance, ranges and coefficient of variation. Finally, we have discussed other measures of location such as the percentiles, which are relevant to the study of the concepts of A and B basis allowables.
    [Show full text]
  • DATAPLOT Users' Guide & Examples
    DATAPLOT (Graphical Language) For Thermo-Calc and DICTRA Software User’s Guide & Examples Thermo-Calc Software AB Norra Stationsgatan 93, 5 tr. SE-113 64 Stockholm, Sweden Copyright 1995-2013 Foundation of Computational Thermodynamics Stockholm, Sweden Declarations Copyright: The Thermo-Calc, DICTRA and TC-PRISMA software are the exclusive copyright properties of the STT (Foundation of Computational Thermodynamics, Stockholm, Sweden) and TCS (Thermo-Calc Software AB, Stockholm, Sweden). All rights are reserved worldwide! Thermo-Calc Software AB has the exclusive rights for further developing and marketing all kinds of versions of Thermo-Calc, DICTRA and TC-PRISMA software/database/interface packages, worldwide. This DATAPLOT (Graphical Language) User’s Guide & Examples, as well as all other related documentation, is the copyright property of Thermo-Calc Software AB. It is absolutely forbidden to make any illegal copies of the TCS-provided software, databases, programming interfaces, and their manuals (User’s Guide and Examples Book) and other technical publications (Reference Book and Technical Information). Any unauthorized duplication of such copyrighted products, is a violation of international copyright law. Individuals or organizations (companies, research companies, governmental institutes, and universities) that make or permit to make unauthorized copies may be subject to prosecution. The utilization of the Thermo-Calc, DICTRA and TC-PRISMA software and associated database and programming interfaces, as well as their manuals and
    [Show full text]