Getting Started with SAS Programming
217 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris

Getting Started with SAS Programming , livre ebook

-

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
217 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

Get up and running with SAS using Ron Cody’s easy-to-follow, step-by-step guide.


Aimed at beginners, Getting Started with SAS Programming: Using SAS Studio in the Cloud uses short examples to teach SAS programming from the basics to more advanced topics in the point-and-click interactive environment of SAS Studio. To begin, you will learn how to register for SAS OnDemand for Academics, an online delivery platform for teaching and learning statistical analysis that provides free access to SAS software via the cloud.


The first part of the book shows you how to use SAS Studio built-in tasks to produce a report, summarize data, and create charts and graphs. It also describes how you can perform basic statistical tests using the interactive point-and-click environment.


The second part of the book uses easy-to-follow examples to show you how to write your own SAS programs and how to use SAS procedures to perform a variety of tasks. This part of the book also explains how to read data from a variety of sources: text files, Excel workbooks, and CSV files. In order to get familiar with the SAS Studio environment, this book also shows you how to access dozens of interesting data sets that are included with the SAS OnDemand for Academics platform.


Sujets

Informations

Publié par
Date de parution 24 février 2021
Nombre de lectures 1
EAN13 9781953329189
Langue English
Poids de l'ouvrage 3 Mo

Informations légales : prix de location à la page 0,0087€. Cette information est donnée uniquement à titre indicatif conformément à la législation en vigueur.

Extrait

The correct bibliographic citation for this manual is as follows: Cody, Ron. 2021. Getting Started with SAS ® Programming: Using SAS ® Studio in the Cloud . Cary, NC: SAS Institute Inc.
Getting Started with SAS ® Programming: Using SAS ® Studio in the Cloud
Copyright © 2021, SAS Institute Inc., Cary, NC, USA
ISBN 978-1-953329-20-2 (Hardcover) ISBN 978-1-953329-16-5 (Paperback) ISBN 978-1-953329-17-2 (Web PDF) ISBN 978-1-953329-18-9 (EPUB) ISBN 978-1-953329-19-6 (Kindle)
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, or transmitted, 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 terms established 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 the permission of the publisher is illegal and punishable by law. Please purchase only authorized electronic 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 is commercial computer software developed at private expense and is provided with RESTRICTED RIGHTS to the United States Government. Use, duplication, or disclosure of the Software by the United 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 extent required under U.S. federal law, the minimum restricted rights as set out in FAR 52.227-19 (DEC 2007). If FAR 52.227-19 is applicable, this provision serves as notice under clause (c) thereof and no other notice is required to be affixed to the Software or documentation. The Government’s rights in Software and documentation shall be only those set forth in this Agreement.
SAS Institute Inc., SAS Campus Drive, Cary, NC 27513-2414
February 2021
SAS ® and all other SAS Institute Inc. product or service names are registered trademarks or trademarks 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 open-source software, which is licensed under its applicable third-party software license agreement. For license information about third-party software distributed with SAS software, refer to http://support.sas.com/thirdpartylicenses .


Contents

About This Book
About The Author
Acknowledgements
Part I: Getting Acquainted with the SAS Studio Environment
Chapter 1: Introduction to SAS OnDemand for Academics
Introduction: An Overview of SAS OnDemand for Academics
Registering for ODA
Conclusion
Chapter 2: The SAS Studio Interface
Introduction
Exploring the Built-In Data Sets
Sorting Your Data
Switching between Column Names and Column Labels
Resizing Tables
Creating Filters
Conclusion
Chapter 3: Importing Your Own Data
Introduction
Uploading Data from Your Local Computer to SAS Studio
Listing the SAS Data Set
Importing an Excel Workbook with Invalid SAS Variable Names
Importing an Excel Workbook That Does Not Have Variable Names
Importing Data from a CSV File
Conclusion
Chapter 4: Creating Reports
Introduction
Using the List Data Task to Create a Simple Listing
Filtering Data
Sorting Data
Outputting HTML and PDF Files
Joining Tables (Using the Query Window)
Conclusion
Chapter 5: Summarizing Data Using SAS Studio
Introduction
Summarizing Numeric Variables
Adding a Classification Variable
Summarizing Character Variables
Conclusion
Chapter 6: Graphing Data
Introduction
Creating a Frequency Bar Chart
Creating a Bar Chart with a Response Variable
Adding a Group Variable
Creating a Pie Chart
Creating a Scatter Plot
Conclusion
Part II: Learning How to Write Your Own SAS Programs
Chapter 7: An Introduction to SAS Programming
SAS as a Programming Language
The SAS Studio Programming Windows
Your First SAS Program
DATA Statement
INILE Statement
INPUT Statement
Assignment Statement
How the DATA Step Works
How the INPUT Statement Works
Reading Delimited Data
How Procedures (PROCs) Work
How SAS Works: A Look Inside the “Black Box”
Conclusion
Chapter 8: Reading Data from External Files
Introduction
Reading Data Values Separated by Delimiters
Reading Comma-Separated Values Files
Reading Data Separated by Other Delimiters
Reading Data in Fixed Columns
Reading Data in Fixed Columns Using Column Input
Reading Data in Fixed Columns Using Formatted Input
Conclusion
Problems
Chapter 9: Reading and Writing SAS Data Sets
What’s a SAS Data Set?
Temporary Versus Permanent SAS Data Sets
Creating a Library by Submitting a LIBNAME Statement
Using the Library Tab to Create a Permanent Library
Reading from a Permanent SAS Data Set
Conclusion
Problems
Chapter 10: Creating Formats and Labels
What Is a SAS Format and Why Is It Useful?
Using SAS Built-in Formats
More Examples to Demonstrate How to Write Formats
Describing the Difference between a FORMAT Statement in a Procedure and a FORMAT Statement in a DATA Step
Making Your Formats Permanent
Creating Variable Labels
Conclusion
Problems
Chapter 11: Performing Conditional Processing
Introduction
Grouping Age Using Conditional Processing
Using Conditional Logic to Check for Data Errors
Describing the IN Operator
Using Boolean Logic (AND, OR, and NOT Operators)
A Special Caution When Using Multiple OR Operators
Conclusion
Problems
Chapter 12: Performing Iterative Processing: Looping
Introduction
Demonstrating a DO Group
Describing a DO Loop
Using a DO Loop to Graph an Equation
DO Loops with Character Values
Leaving a Loop Based on Conditions (DO WHILE and DO UNTIL Statements)
DO WHILE
Combining an Iterative Loop with a WHILE Condition
DO UNTIL
Demonstrating That a DO UNTIL Loop Executes at Least Once
Combining an Iterative Loop with an UNTIL Condition
LEAVE and CONTINUE Statements
Conclusion
Problems
Chapter 13: Working with SAS Dates
Introduction
Reading Dates from Text Data
Creating a SAS Date from Month, Day, and Year Values
Describing a Date Constant
Extracting the Day of the Week, Day of the Month, Month, and Year from a SAS Date
Adding a Format to the Bar Chart
Computing Age from Date of Birth: The YRDIF Function
Conclusion
Problems
Chapter 14: Subsetting and Combining SAS Data Sets
Introduction
Subsetting (Filtering) Data in a SAS Data Set
Describing a WHERE= Data Set Option
Describing a Subsetting IF Statement
A More Efficient Way to Subset Data When Reading Raw Data
Creating Several Data Subsets in One DATA Step
Combining SAS Data Sets (Combining Rows)
Adding a Few Observations to a Large Data Set (PROC APPEND)
Interleaving Data Sets
Merging Two Data Sets (Adding Columns)
Controlling Which Observations Are Included in a Merge (IN= Data Set Option)
Performing a One-to-Many or Many-to-One Merge
Merging Two Data Sets with Different BY Variable Names
Merging Two Data Sets with One Character and One Numeric BY Variable
Updating a Master File from a Transaction File (UPDATE Statement)
Conclusion
Problems
Chapter 15: Describing SAS Functions
Introduction
Describing Some Useful Numeric Functions
Function Name: MISSING
Function Name: N
Function Name: NMISS
Function Name: SUM
Function Name: MEAN
Function Name: MIN
Function Name: MAX
Function Name: SMALLEST
Function Name: LARGEST
Programming Example Using the N, NMISS, MAX, LARGEST, and MEAN Functions
Function Name: INPUT
CALL Routine: CALL SORTN
Function Name: LAG
Function Name: DIF
Describing Some Useful Character Functions
Function Names: LENGTHN and LENGTHC
Function Names: TRIMN and STRIP
Function Names: UPCASE, LOWCASE, and PROPCASE (Functions That Change Case)
Function Name: PUT
Function Name: SUBSTRN (Newer Version of the SUBSTR Function)
Function Names: FIND and FINDC
Function Names: CAT, CATS, and CATX
Function Names: COUNT and COUNTC
Function Name: COMPRESS
Function Name: SCAN
CALL Routine: CALL MISSING
Function Names: NOTDIGIT, NOTALPHA, and NOTALNUM
Function Names: ANYDIGIT, ANYALPHA, and ANYALNUM
Function Name: TRANWRD
Conclusion
Problems
Chapter 16: Working with Multiple Observations per Subject
Introduction
Useful Tools for Working with Longitudinal Data
Describing First. and Last. Variables
Computin

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents