The Little SAS

2y ago
61 Views
6 Downloads
3.57 MB
68 Pages
Last View : 1m ago
Last Download : 2m ago
Upload by : Jamie Paz
Transcription

The correct bibliographic citation for this manual is as follows: Slaughter, Susan J. and Lora D.Delwiche. 2017. The Little SAS Enterprise Guide Book. Cary, NC: SAS Institute Inc.The Little SAS Enterprise Guide BookCopyright 2017, SAS Institute Inc., Cary, NC, USAISBN 978-1-62960-380-3 (Hard copy)ISBN 978-1-62960-888-4 (EPUB)ISBN 978-1-62960-889-1 (MOBI)ISBN 978-1-62960-890-7 (PDF)All Rights Reserved. Produced in the United States of America.For a hard copy book: No part of this publication may be reproduced, stored in a retrieval system, ortransmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise,without the prior written permission of the publisher, SAS Institute Inc.For a web download or e-book: Your use of this publication shall be governed by the termsestablished by the vendor at the time you acquire this publication.The scanning, uploading, and distribution of this book via the Internet or any other means without thepermission of the publisher is illegal and punishable by law. Please purchase only authorizedelectronic editions and do not participate in or encourage electronic piracy of copyrighted materials.Your support of others’ rights is appreciated.U.S. Government License Rights; Restricted Rights: The Software and its documentation iscommercial computer software developed at private expense and is provided with RESTRICTEDRIGHTS to the United States Government. Use, duplication, or disclosure of the Software by theUnited States Government is subject to the license terms of this Agreement pursuant to, as applicable,FAR 12.212, DFAR 227.7202-1(a), DFAR 227.7202-3(a), and DFAR 227.7202-4, and, to the extentrequired under U.S. federal law, the minimum restricted rights as set out in FAR 52.227-19 (DEC2007). If FAR 52.227-19 is applicable, this provision serves as notice under clause (c) thereof and noother notice is required to be affixed to the Software or documentation. The Government’s rights inSoftware and documentation shall be only those set forth in this Agreement.SAS Institute Inc., SAS Campus Drive, Cary, NC 27513-2414February 2017SAS and all other SAS Institute Inc. product or service names are registered trademarks ortrademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration.Other brand and product names are trademarks of their respective companies.SAS software may be provided with certain third-party software, including but not limited to opensource software, which is licensed under its applicable third-party software license agreement. Forlicense information about third-party software distributed with SAS software, refer tohttp://support.sas.com/thirdpartylicenses.

The Little SAS Enterprise Guide Book. Full bookavailable for purchase here.ContentsAbout SAS Enterprise GuideAbout This Book xiAcknowledgments xiiiixTutorials Section 1Tutorial A Getting Started with SAS Enterprise Guide 3Starting SAS Enterprise Guide 3SAS Enterprise Guide windows4Basic elements of SAS Enterprise Guide5Entering data 5Creating a frequency report 22Creating a scatter plot28Adding a note to the project 34Saving the project 36Tutorial B Creating Reports 39Before beginning this tutorial 39Starting SAS Enterprise Guide39Opening the Tours data table 40Creating a simple report 45Changing titles and footnotes 48Changing column labels and formatting values 53Defining your own formats59Adding manual links 68Selecting a style for the report 69Changing the output format for the report 71Completing the tutorial74Tutorial C Working with Data in the Query BuilderBefore beginning this tutorial 77Starting SAS Enterprise Guide 77Opening the Volcanoes SAS data table 79Opening the Query Builder 80Selecting columns8277

ivContentsCreating a new column 84Ordering and removing columns96Filtering data 98Sorting the data rowsCompleting the tutorial108110Tutorial D Joining Two Data Files Together 113Before beginning this tutorial 113Starting SAS Enterprise Guide 113Opening the two data files to be joined 114Joining tables117Filtering the data123Selecting which rows to keep 128Completing the tutorial134Reference Section 135Chapter 1SAS Enterprise Guide Basics 1371.1SAS Enterprise Guide Windows 1381.2Projects1.3Maximizing and Splitting the Workspace 1421.4Managing Process Flows1.5Running Projects and Process Flows1.6Linking Items in Process Flows 1481401661461.7SAS Data Tables1.8Viewing Properties of Data Tables and Columns 1521.9Changing Properties of Columns1501.10 Selected Standard Formats1541561.11 Documenting Projects with Notes158

ContentsChapter 2Bringing Data into a Project 1612.1 Sources of Data 1622.2 Locations for Data 1642.3 Assigning Project Libraries 1662.4 Creating New SAS Data Tables 1682.5 Editing SAS Data Tables in a Data Grid 1702.6 Inserting Computed Columns in a Data Grid1722.7 Importing Microsoft Excel Spreadsheets 1742.8 Importing Delimited Raw Data 1762.9 Importing Fixed-Column Raw Data 1782.10 Exporting Data 180Chapter 3Working with Tasks 2253.1 Finding and Opening Tasks 1843.2 Selecting Data and Assigning Task Roles3.3 Reopening Tasks and Making Changes3.4 Customizing Titles and Footnotes1861881903.5 Applying Standard Formats in a Task 1923.6 Defining Your Own Character Formats3.7 Defining Your Own Numeric Formats1941963.8 Applying User-Defined Formats in a Task 1983.9 Grouping Data with Formats in a Task 2003.10 Saving Task Results to a Data Set2023.11 Changing the Result Format 2043.12 Changing the Result Style2063.13 Customizing Styles Using the Style Manager 2083.14 Exporting ResultsChapter 4210Producing Complex Reports in Summary Tables2134.1Creating Summary Tables with Frequencies 2144.2Adding Statistics to Summary Tables4.3Changing Heading Properties in Summary Tables 2184.4Changing Class Level Headings and Properties inSummary Tables 2204.5Changing Table Properties in Summary Tables 2224.6Changing Data Value Properties in Summary Tables 224216v

viContentsChapter 5Modifying Data Using the Query Builder2655.1 Creating a Query 2285.2 Selecting Columns in a Query2305.3 Creating Columns Using Mathematical Operators5.4 Creating Columns Using Functions5.5234Selected Functions 2365.6 Adding a Grand Total to a Data Table 2385.7Adding Subtotals to a Data Table5.8Creating Summary Data Tables in a Query 2425.9Recoding Values in a Query2402445.10 Changing the Result Type of QueriesChapter 6Sorting and Filtering Data2462496.1 Filtering Data in a Task 2506.2 Using the Filter and Sort Task 2526.3 Using the Sort Data Task 2546.4 Sorting Data in a Query 2566.5 Filtering Data in a Query 2586.6 Creating Compound Filters in a Query6.7 Creating Advanced Filters in a QueryChapter 7260262Combining Data Tables 2657.1 Methods for Combining Tables2667.2 Appending Tables 2687.3 Joining Tables 2707.4 Setting the Properties of a JoinChapter 8Basic Statistical Analysis2722758.1 Writing and Running SAS Programs 2768.2 Creating Process Flows from SAS Programs8.3 Viewing Program and Project Logs2808.4 Saving SAS Programs 2828.5 Using Tasks to Generate SAS Programs284278232

ContentsAppendix A Data Used in This Book287A Data Used in This BookTours Data289289Tour Dates Data290Tour Bookings DataVolcanoes DataEruptions Data291293295Latitude and Longitude DataPortland Flights DataSeattle Flights Data300Advertising Results DataIndex 303298300301vii

viiiContents

The Little SAS Enterprise Guide Book. Fullbook available for purchase here.AGetting Started with SAS Enterprise GuideThis first tutorial will give you a basic understanding of how SAS Enterprise Guide worksand how quickly tasks can be accomplished. The following topics will be covered: Starting SAS Enterprise Guide A quick tour of SAS Enterprise Guide windows Data types Entering data into the Data Grid Using SAS Enterprise Guide tasks Making changes to tasksThe data for this tutorial come from Fire and Ice Tours, a fictional company that arrangestours of volcanoes around the world. For each tour, the company keeps track of the nameof the volcano, the city from which the tour departs, the number of days of the tour, andthe price. Because the tours can require some physical exertion, the company gives eachtour a difficulty rating: easy, moderate, or challenging.Starting SAS Enterprise GuideStart SAS Enterprise Guide by eitherdouble-clicking the SAS Enterprise Guideicon on your desktop, or selecting SASEnterprise Guide from the Windows Startmenu. Starting SAS Enterprise Guidebrings up the SAS Enterprise Guidewindow in the background, with theWelcome window in the foreground. TheWelcome window allows you to choosebetween opening an existing project orstarting a new project. Click New Project.SAS Enterprise Guide ProjectsSAS Enterprise Guide organizes allyour work into projects. You canwork on only one project at a time,and each project is stored in a singlefile. A project will contain all thereports that you produce, plusshortcuts to all the data files thatyou use.

4The Little SAS Enterprise Guide BookSAS Enterprise Guidewindow When you firststart SAS Enterprise Guide,your screen should looksomething like thefollowing. There are severalparts to the SAS EnterpriseGuide window: some arevisible, while others may behidden or temporarilyclosed.Resetting SAS Enterprise Guide OptionsThere are many options in SAS Enterprise Guidethat affect how it works. For example, you can turnoff the Welcome window, or change the defaultformat and appearance of results. If someone hasalready used SAS Enterprise Guide on yourcomputer, they may have made some changes to theinitial settings. To reset all options to their originalsettings, select Tools Options from the menu bar.Then click Reset All.ProjectTreeWorkspace showingthe Process FlowResourcespane showingServersBasic elements of SAS Enterprise GuideProject Tree: This window displays your project in a hierarchical tree diagram.Workspace: This is a container for the Process Flow, results from tasks that you run, DataGrids, SAS code, SAS logs, and Notes.Process Flow: This window displays a graphical representation of your project.

Tutorial A: Getting Started with SAS Enterprise Guide5Resources pane: This pane shows either the Servers, Tasks, SAS Folders, PromptManager, or Data Exploration History windows. The Servers window displays all the SASservers that you can access during your SAS Enterprise Guide session. A SAS server isany computer on which SAS software is installed. The Tasks window displays allavailable tasks. The SAS Folders contain links to your stored processes, information maps,and projects. The Prompt Manager displays all available prompts. The Data ExplorationHistory provides links to any data exploration done in the project. To switch between thewindows, click their icons at the top of the pane:SAS Folders,for the Prompt Manager, orfor Servers,for Tasks,forfor Data Exploration History.Task Status (not shown): When you are running a task, messages about the progress ofthe task appear in the Task Status window. To open the Task Status window, select View Task Status from the menu bar.Entering data There are many ways to get data into SAS Enterprise Guide, and SASEnterprise Guide can use data from a variety of sources including SAS data sets,Microsoft Excel files, and plain text files. For this example, you are simply going to typethe data directly into SAS Enterprise Guide. To bring up the Data Grid so you can enterthe data, select File New Data from the menu bar.

6The Little SAS Enterprise Guide BookThis opens the New Data wizard. In the first window of the wizard, SAS EnterpriseGuide asks what you want to name the data table and where you want to save the data.The name for the data table is initially set to Data.SAS Data Sets or SAS Data Tables?A SAS data set and a SAS data table are the samething. The two terms are used interchangeably, andyou will see both terms used in this book.Data Table Member NamesYou can give your data tables almost any names you want, but thenames must be 32 characters or fewer in length and not start with aperiod or a space. While it is possible to have special characters(including spaces) in your names, you may want to stick with justletters, numerals, and underscores. These characters are all that areallowed under the default naming rules for SAS programs. Inaddition, names must start with a letter or underscore. Using theserules will make it easier if you ever want to refer to your data in SASprograms that you or someone else writes.

Tutorial A: Getting Started with SAS Enterprise Guide7Give the new data table the name Tours by typing Tours in the Name box. To see all theSAS libraries (storage locations) available to you, click the plus signs next to the wordsLocal and then Libraries. For this example, save the data in the SASUSER library. ClickSASUSER to select the SASUSER library. The SAS Enterprise Guide administrator at yoursite may have set up the SASUSER library so that you cannot save files there. If this is thecase for you, choose an alternate library that is available to you (but do not choose WORKsince that is a temporary storage location).Click Next to open the second window of the New Data wizard.LibrariesSAS Enterprise Guide and SAS organize SAS data tables intolibraries. Libraries are locations, or folders, where data tables arestored. Instead of referring to the folders by their full path, SASEnterprise Guide gives the folders short nicknames, called librefs.The WORK library points to a temporary storage location that isautomatically erased when you exit SAS Enterprise Guide. TheSASUSER library is a permanent storage location. If the EGTASKlibrary is defined for your site, then data tables produced by taskswill be stored in the EGTASK library. If the EGTASK library is notdefined, then data tables produced by tasks will be stored in theSASUSER library. Libraries can be created using the Assign ProjectLibrary wizard available from the Tools menu.

8The Little SAS Enterprise Guide BookThe second window of the New Data wizard is where you assign names and properties tothe columns in your data table. As a starting point, the New Data wizard sets up sixcolumns with one-letter names from A to F. All these initial columns have the sameproperties.Column NamesYou can give your columns almost any names youwant, but the names must be 32 characters or fewer inlength. While it is possible to have special characters(including spaces) in your names, you may want to stickwith just letters, numerals, and underscores. Thesecharacters are all that are allowed under the defaultnaming rules for SAS programs. In addition, namesmust start with a letter or underscore. Using these ruleswill make it easier if you ever want to refer to your datain SAS programs that you or someone else writes.

Tutorial A: Getting Started with SAS Enterprise Guide9In the Column Properties box, you can assign each column a name, label, type, group,length, display format, and read-in format. The first column will contain the names of thevolcanoes, so type Volcano in the box next to Name.When you press Enter, the name you typed in the Name box will replace the name, in thiscase A, in the Columns box on the left. Because the names of the volcanoes containcharacters, as opposed to numbers, leave the Type and Group properties as Character,and because none of the volcano names are longer than 12 characters, leave the Length setto 12.Lengths of Character ColumnsThe New Data wizard in SAS Enterprise Guide gives charactercolumns a length of 12. If your character data are longer than 12characters, you need to change the length of the column to be at leastas long as the longest data value. If all your data values are shorterthan 12 characters, you can shorten the length for the column. Usingshorter lengths for character data decreases the storage space neededfor the data table.

10The Little SAS Enterprise Guide BookNow click the column named B in the Columns box on the left. This column will containthe name of the departure city for the tour, so type the word Departs next to Name in theColumn Properties box on the right. Leave the other settings as they are.

Tutorial A: Getting Started with SAS Enterprise Guide11The third column contains the number of days the tour lasts. Give it the name Days, andbecause the values in this column are numbers, use the pull-down list to select Numericfor the Type property.

12The Little SAS Enterprise Guide BookNotice that when you set the column type to numeric, the icon next to the column namechanges from the red pyramid(character) to the blue ball(numeric). The length of8 is the default for all numeric columns and means that the numbers will be stored withmaximum precision. Generally, there is no need to change the length of numeric columns.Character versus NumericHow do you decide if a column should be characteror numeric? If the values for the column have lettersor special characters in them, then the column mustbe character. If the column contains only numerals,then it could be either character or numeric.Generally, if it does not make sense to add or subtractthe values, then the column should be character.

Tutorial A: Getting Started with SAS Enterprise GuideName the fourth column Price and give it the type Numeric. When you choose thenumeric type, you have several options for Group: numeric, date, time, and currency.Because Price will contain currency values, select the group Currency.Numeric GroupsBy choosing a group for your numeric column, what you aredoing is assigning a format to your column. A format is away of displaying the values in the column. If you choosecurrency, then when you type a number like 1200, SASEnterprise Guide will automatically display the number as 1,200. SAS Enterprise Guide has made it easy for you toassign some of the frequently used formats to your columns.13

14The Little SAS Enterprise Guide BookNotice that when you do this, the icon changes from the blue ball to the currency icon.

Tutorial A: Getting Started with SAS Enterprise GuideThe final column will contain the difficulty ratings of each tour. The most challengingtours have values of c, the moderately challenging tours have values of m, while theeasiest tours have values of e. Give the column the name Difficulty and because thevalues for the column are single characters, change the length to 1. You could leave thecolumn as length 12, but then the column would take more storeage space than it reallyneeds.15

16The Little SAS Enterprise Guide BookNow the properties for all the columns have been set. However, there is one extra column:column F. Delete the unnecessary column by clicking it in the Columns box and thenclicking the delete buttonto the right of the Columns box.

Tutorial A: Getting Started with SAS Enterprise GuideNow all the columns have been given names and properties, and there are no extracolumns.Click Finish to create the new data table. The Tours data table appears in a Data Grid inthe workspace with all the columns that you just defined. There is also an icon for theTours data table in the Project Tree under the words Process Flow.17

18The Little SAS Enterprise Guide BookNotice that the numeric columns, Days and Price, have periods in the data cells. This isbecause in SAS Enterprise Guide missing numeric values are represented by a singleperiod, whereas missing character values are represented by blanks. Because no data havebeen entered into the Data Grid, all the values are missing.

Tutorial A: Getting Started with SAS Enterprise Guide19You can now start entering the data into the Data Grid. To enter data into the Data Grid,simply click a cell and start typing the data. Click the first cell in the Volcanocolumn and type the volcano name Etna.To move over to the next column, press the Tab key. To move down to the cell below,press the Enter key. You can also use the arrow keys to move around in the Data Grid, oryou can simply

Tutorial A Getting Started with SAS Enterprise Guide 3 . Starting SAS Enterprise Guide . 3. SAS Enterprise Guide windows . 4. Basic elements of SAS Enterprise Guide . 5. Entering data . 5. Creating a frequency report . 22. Creating a scatter plot . 28. Adding a note to the project . 34. Saving the project . 36. Tutorial B Creating Reports 39

Related Documents:

POStERallows manual ordering and automated re-ordering on re-execution pgm1.sas pgm2.sas pgm3.sas pgm4.sas pgm5.sas pgm6.sas pgm7.sas pgm8.sas pgm9.sas pgm10.sas pgm1.sas pgm2.sas pgm3.sas pgm4.sas pgm5.sas pgm6.sas pgm7.sas pgm8.sas pgm9.sas pgm10.sas 65 min 45 min 144% 100%

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

SAS OLAP Cubes SAS Add-In for Microsoft Office SAS Data Integration Studio SAS Enterprise Guide SAS Enterprise Miner SAS Forecast Studio SAS Information Map Studio SAS Management Console SAS Model Manager SAS OLAP Cube Studio SAS Workflow Studio JMP Other SAS analytics and solutions Third-party Data

Both SAS SUPER 100 and SAS SUPER 180 are identified by the “SAS SUPER” logo on the right side of the instrument. The SAS SUPER 180 air sampler is recognizable by the SAS SUPER 180 logo that appears on the display when the operator turns on the unit. Rev. 9 Pg. 7File Size: 1MBPage Count: 40Explore furtherOperating Instructions for the SAS Super 180www.usmslab.comOPERATING INSTRUCTIONS AND MAINTENANCE MANUALassetcloud.roccommerce.netAir samplers, SAS Super DUO 360 VWRuk.vwr.comMAS-100 NT Manual PDF Calibration Microsoft Windowswww.scribd.com“SAS SUPER 100/180”, “DUO SAS SUPER 360”, “SAS .archive-resources.coleparmer Recommended to you b

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have