95
Efficient Efficient Way to Learn Way to Learn SAS with Virtually No SAS with Virtually No Cost Cost Mirjana Stojanovic Statistical Programmer Chapel Hill, NC

Efficient Way to Learn SAS With Virtually No Cost

Embed Size (px)

Citation preview

Page 1: Efficient Way to Learn SAS With Virtually No Cost

EfficientEfficient Way to Learn Way to Learn SAS SAS with Virtually No Costwith Virtually No Cost

Mirjana Stojanovic

Statistical Programmer

Chapel Hill, NC

Page 2: Efficient Way to Learn SAS With Virtually No Cost

Learning from WEB sites from WEB sitesLearning from WEB sites from WEB sites

Find out WEB sites which is the most suitable for your needs

Follow instructions or copy and paste into SAS learning edition (optional)

Check back frequently and check links which you will use the most of the time

Find out WEB sites which is the most suitable for your needs

Follow instructions or copy and paste into SAS learning edition (optional)

Check back frequently and check links which you will use the most of the time

M Stojanovic:M Stojanovic:M Stojanovic:M Stojanovic:M Stojanovic:

M Stojanovic:

Page 3: Efficient Way to Learn SAS With Virtually No Cost

FirstObs.comhttp://www.firstobs.com

Detailed and compactBroad spectrum of informationGood links to other sitesNot too narrativeBasic and advanced procedures

Page 4: Efficient Way to Learn SAS With Virtually No Cost
Page 5: Efficient Way to Learn SAS With Virtually No Cost
Page 6: Efficient Way to Learn SAS With Virtually No Cost

FirstObs.com (cont.)FirstObs.com (cont.) http://www.firstobs.comhttp://www.firstobs.com

Tutorial ListTutorial List Net Resources Net Resources expanded list expanded list

of Internet resourcesof Internet resources SAS CommunitySAS Community  Search FirstObs.com site by Search FirstObs.com site by

keyword and topickeyword and topic

Page 7: Efficient Way to Learn SAS With Virtually No Cost
Page 8: Efficient Way to Learn SAS With Virtually No Cost

FirstObs.com (cont.)FirstObs.com (cont.)http://www.firstobs.comhttp://www.firstobs.com

Data step Combining data files Execute: if...Then  Functions  Reading raw data Retain statement

Page 9: Efficient Way to Learn SAS With Virtually No Cost
Page 10: Efficient Way to Learn SAS With Virtually No Cost

FirstObs.com (cont.)FirstObs.com (cont.)http://www.firstobs.comhttp://www.firstobs.com

SAS procedureProc Format Proc Freq Proc Print Proc Sort  Proc Contents

Page 11: Efficient Way to Learn SAS With Virtually No Cost
Page 12: Efficient Way to Learn SAS With Virtually No Cost

Institute for Clinical and Epidemiologic ResearchInstitute for Clinical and Epidemiologic Researchhttp://hsrd.durham.med.va.gov/Biostat/training/SAS%20presentation%20v10.pdfhttp://hsrd.durham.med.va.gov/Biostat/training/SAS%20presentation%20v10.pdf

Comprehensive manual Easy to follow Simple sentences Descriptive explanation Programming mistakes and how

to avoid them

Page 13: Efficient Way to Learn SAS With Virtually No Cost
Page 14: Efficient Way to Learn SAS With Virtually No Cost

Institute for Clinical and Epidemiologic ResearchInstitute for Clinical and Epidemiologic Researchhttp://hsrd.durham.med.va.gov/Biostat/training/SAS%20presentation%20v10.pdfhttp://hsrd.durham.med.va.gov/Biostat/training/SAS%20presentation%20v10.pdf

Basic Components of SAS - Getting Data into a SAS Data Set - Types of SAS Data Sets - Permanent Data Sets - Libname

Statement - Using Existing SAS Data Set * Set Statement * Merge Statement

Page 15: Efficient Way to Learn SAS With Virtually No Cost
Page 16: Efficient Way to Learn SAS With Virtually No Cost
Page 17: Efficient Way to Learn SAS With Virtually No Cost
Page 18: Efficient Way to Learn SAS With Virtually No Cost
Page 19: Efficient Way to Learn SAS With Virtually No Cost

Institute for Clinical and Epidemiologic ResearchInstitute for Clinical and Epidemiologic Research http://hsrd.durham.med.va.gov/Biostat/training/presentation%20II%20v10.pdfhttp://hsrd.durham.med.va.gov/Biostat/training/presentation%20II%20v10.pdf

Introduction to SAS Procedures Proc Means Proc Univariate Proc Freq Proc Contents Proc Plot

Page 20: Efficient Way to Learn SAS With Virtually No Cost
Page 21: Efficient Way to Learn SAS With Virtually No Cost
Page 22: Efficient Way to Learn SAS With Virtually No Cost
Page 23: Efficient Way to Learn SAS With Virtually No Cost

Virginia Commonwealth University Virginia Commonwealth University http://www.people.vcu.edu/~rjohnson/bios524/Cody%20Notes/index.htmlhttp://www.people.vcu.edu/~rjohnson/bios524/Cody%20Notes/index.html

Based on Cody and Pass, SAS Programming by Example

Very clear and simple sentencesDescriptive explanationEasy navigation Remarks/Hints in red colorOne example per page

Page 24: Efficient Way to Learn SAS With Virtually No Cost

Virginia Commonwealth University (cont.)Virginia Commonwealth University (cont.)http://www.people.vcu.edu/~rjohnson/bios524/Cody%20Notes/index.htmlhttp://www.people.vcu.edu/~rjohnson/bios524/Cody%20Notes/index.html

Chapter 1.

What goes on in the data step? - The compilation phase - The execution phaseChapter 8.“Remembering" values from

previous observations

Page 25: Efficient Way to Learn SAS With Virtually No Cost
Page 26: Efficient Way to Learn SAS With Virtually No Cost
Page 27: Efficient Way to Learn SAS With Virtually No Cost
Page 28: Efficient Way to Learn SAS With Virtually No Cost
Page 29: Efficient Way to Learn SAS With Virtually No Cost
Page 30: Efficient Way to Learn SAS With Virtually No Cost
Page 31: Efficient Way to Learn SAS With Virtually No Cost
Page 32: Efficient Way to Learn SAS With Virtually No Cost
Page 33: Efficient Way to Learn SAS With Virtually No Cost
Page 34: Efficient Way to Learn SAS With Virtually No Cost

RHO, Inc.RHO, Inc.http://www.rhoworld.com/index_services_biostats.htmhttp://www.rhoworld.com/index_services_biostats.htm

Explanation through LOG messages(Note) Miscellaneous programming materials Tutorial on the SAS system Good summary at the end of chapters Examples supported with explanations

Page 35: Efficient Way to Learn SAS With Virtually No Cost

Chapter 1. Introduction

Chapter 2. Introduction to Computers

Chapter 3. Introduction to SAS

Chapter 4. Using SAS Procedures

Chapter 5. Transforming SAS Data Sets

Chapter 6. SAS Programming

Chapter 7. Managing and Combining SAS Data Sets

Chapter 8. Using External Files with SAS

Chapter 9. Report Writing

Chapter 10. Matrix Algebra with SAS/IML

Chapter 11. Statistical Graphics with SAS/Graph

Chapter 12. Data Entry and Editing with SAS/FSP

Chapter 13. The Macro Language

Chapter 14. Miscellaneous Programming Materials

Chapter 15. Research Data Management

ODS PAPER

Page 36: Efficient Way to Learn SAS With Virtually No Cost

RHO, Inc.RHO, Inc.http://www.rhoworld.com/index_services_biostats.htmhttp://www.rhoworld.com/index_services_biostats.htm

Chapter 5.Chapter 5. Transforming SAS Data Sets a. Creating new SAS data sets

b. Creating and transforming variablesc. Subsetting observationsd. Subsetting variables

Page 37: Efficient Way to Learn SAS With Virtually No Cost

WHERE vs IF

The WHERE statement works before observation are brought into the data step(that is the PROGRAM DATA VECTOR) .

The IF statement works on observation that are already in the data step.

The WHERE statement is not executable, but the IF statement is

The WHERE statement operates only on observations in SAS data sets, whereas the IF statement can operate either on observations from existing SAS data sets or on observations created with an input statement.

If a BY statement does not accompany a SET or MERGE statement, the WHERE and IF statements usually produce the same result

In almost all cases a WHERE statement is more efficient than an IF statement(observations do not have to be moved into the PDV)

The WHERE statement, but not the IF statement can be used in SAS PROCS .

Page 38: Efficient Way to Learn SAS With Virtually No Cost

RHO, Inc.RHO, Inc.http://www.rhoworld.com/index_services_biostats.htmhttp://www.rhoworld.com/index_services_biostats.htm

Chapter 7.COMBINING AND MANAGING SA

S DATA SETSa. Multiple input data setsb. SAS special variablesc. Reshaping SAS data setsd. Data library management

Page 39: Efficient Way to Learn SAS With Virtually No Cost
Page 40: Efficient Way to Learn SAS With Virtually No Cost

RHO, Inc.RHO, Inc.http://www.rhoworld.com/index_services_biostats.htmhttp://www.rhoworld.com/index_services_biostats.htm

MISCELLANEOUS PROGRAMMING MATERIALS

 

Page 41: Efficient Way to Learn SAS With Virtually No Cost
Page 42: Efficient Way to Learn SAS With Virtually No Cost
Page 43: Efficient Way to Learn SAS With Virtually No Cost
Page 44: Efficient Way to Learn SAS With Virtually No Cost
Page 45: Efficient Way to Learn SAS With Virtually No Cost
Page 46: Efficient Way to Learn SAS With Virtually No Cost

University of Central FloridaUniversity of Central Floridahttp://dms.stat.ucf.edu/Sta4102notes/Prog2/Chapter10/STA4102-Chapter10.ppthttp://dms.stat.ucf.edu/Sta4102notes/Prog2/Chapter10/STA4102-Chapter10.ppt

Chapter 10 Well animatedStep by step explanationsRefresher QuizDifferent color for better

understanding

Page 47: Efficient Way to Learn SAS With Virtually No Cost
Page 48: Efficient Way to Learn SAS With Virtually No Cost
Page 49: Efficient Way to Learn SAS With Virtually No Cost
Page 50: Efficient Way to Learn SAS With Virtually No Cost

University of Central Florida(cont.)University of Central Florida(cont.)

http://dms.stat.ucf.edu/Sta4102notes/Prog1/Chapter5/Chapter5-STA4102.ppthttp://dms.stat.ucf.edu/Sta4102notes/Prog1/Chapter5/Chapter5-STA4102.ppt

Chapter 5

Process flow of Subseting IF

How to create SAS variable conditionally

Page 51: Efficient Way to Learn SAS With Virtually No Cost
Page 52: Efficient Way to Learn SAS With Virtually No Cost
Page 53: Efficient Way to Learn SAS With Virtually No Cost
Page 54: Efficient Way to Learn SAS With Virtually No Cost
Page 55: Efficient Way to Learn SAS With Virtually No Cost
Page 56: Efficient Way to Learn SAS With Virtually No Cost
Page 57: Efficient Way to Learn SAS With Virtually No Cost
Page 58: Efficient Way to Learn SAS With Virtually No Cost
Page 59: Efficient Way to Learn SAS With Virtually No Cost
Page 60: Efficient Way to Learn SAS With Virtually No Cost
Page 61: Efficient Way to Learn SAS With Virtually No Cost
Page 62: Efficient Way to Learn SAS With Virtually No Cost

University of Central Florida University of Central Florida (cont.)(cont.)

http://dms.stat.ucf.edu/Sta4102notes/Prog2/Chapter9/Chapter9-STA4102.ppthttp://dms.stat.ucf.edu/Sta4102notes/Prog2/Chapter9/Chapter9-STA4102.ppt

Chapter 9

Refresher Quiz

Page 63: Efficient Way to Learn SAS With Virtually No Cost
Page 64: Efficient Way to Learn SAS With Virtually No Cost

Karolinska Institutet in Stockholm.Karolinska Institutet in Stockholm.Paul DickmanPaul Dickman

http://www.pauldickman.com/teaching/sas/index.html

http://www.pauldickman.com/teaching/sas/set_by.html

http://www.pauldickman.com/teaching/sas/sas_tips_cleaning8.pdf

http://www.pauldickman.com/teaching/sas/sas_tips_cleaning8.pdf

Page 65: Efficient Way to Learn SAS With Virtually No Cost
Page 66: Efficient Way to Learn SAS With Virtually No Cost
Page 67: Efficient Way to Learn SAS With Virtually No Cost
Page 68: Efficient Way to Learn SAS With Virtually No Cost

National Institute of HealthNational Institute of Healthhttp://support.cit.nih.gov/statsoft/training/classrm/courstmp.htmhttp://support.cit.nih.gov/statsoft/training/classrm/courstmp.htm

SAS Programming Fundamentals I

http://support.cit.nih.gov/Statsoft/training/crsnotes/pdf/sasfund1.pdfSAS Programming Fundamentals IIhttp://support.cit.nih.gov/statsoft/training/crsnotes/fun22tmp.htm

Page 69: Efficient Way to Learn SAS With Virtually No Cost

National Institute of Health (cont.)National Institute of Health (cont.)

Systematic explanationsPlenty of good examplesExercises includedCreating maps with SAS

Page 70: Efficient Way to Learn SAS With Virtually No Cost
Page 71: Efficient Way to Learn SAS With Virtually No Cost
Page 72: Efficient Way to Learn SAS With Virtually No Cost

National Institute of HealthNational Institute of Health http://support.cit.nih.gov/statsoft/training/classrm/courstmp.htmhttp://support.cit.nih.gov/statsoft/training/classrm/courstmp.htm

Producing Tables with SAS Producing Graphs with SAS Producing Reports with SAS Using the SAS System for Elementary S

tatistical Analysis

Using Proc Freq in the SAS System to Perform Categorical Data Analysis

Page 73: Efficient Way to Learn SAS With Virtually No Cost

University of FloridaUniversity of Floridahttp://ifasstat.ufl.edu/sta4702/pdf/SASIntro.pdfhttp://ifasstat.ufl.edu/sta4702/pdf/SASIntro.pdf

DescriptiveChoosing different color for a better

understandingPresentation in pictures

Page 74: Efficient Way to Learn SAS With Virtually No Cost

University of Florida (cont.)University of Florida (cont.)http://ifasstat.ufl.edu/sta4702/pdf/SASIntro.pdfhttp://ifasstat.ufl.edu/sta4702/pdf/SASIntro.pdf

Rules of SAS UseGeneral Form of a SAS ProgramDifferent ways one can read in data

using SASReading Data from an External Text

FileSAS Datasets

Page 75: Efficient Way to Learn SAS With Virtually No Cost
Page 76: Efficient Way to Learn SAS With Virtually No Cost

University of Florida (cont.)University of Florida (cont.)http://ifasstat.ufl.edu/sta4702/pdf/SASIntro.pdfhttp://ifasstat.ufl.edu/sta4702/pdf/SASIntro.pdf

Temporary and Permanent SAS Data Sets

Creating a Permanent Data SetList InputDelimited FilesCombining Data Sets

Page 77: Efficient Way to Learn SAS With Virtually No Cost
Page 78: Efficient Way to Learn SAS With Virtually No Cost

Andrew Karp on Proc MeansAndrew Karp on Proc Means

http://www.hasug.org/HASUG%20_PROC_MEANS_Enhancements.pdf

http://www2.sas.com/proceedings/sugi27/p018-27.pdf

http://www.dasconsultants.com/papers/CarpMcQProcMeans.pdf

Page 79: Efficient Way to Learn SAS With Virtually No Cost
Page 80: Efficient Way to Learn SAS With Virtually No Cost

SAS Customer Support CenterSAS Customer Support Center

http://support.sas.com/documentation/onlinedoc/code.samples.html

http://support.sas.com/publishing/pdf/57198

_ch3pg76.pdf

Using PROC MEANS and PROC FREQ

to count MISSING VALUES

Page 81: Efficient Way to Learn SAS With Virtually No Cost

The Pennsylvania State UniversityThe Pennsylvania State University

http://www.stat.psu.edu/~jianchu/STAT480.htm#lecture%20Noteshttp://www.stat.psu.edu/~jianchu/STAT480.htm#lecture%20Notes

Clear short examplesHomework's and solutionsExamples on one pageEasy to followGiven advantages

Page 82: Efficient Way to Learn SAS With Virtually No Cost

The Pennsylvania State University (cont.)The Pennsylvania State University (cont.)

http://www.stat.psu.edu/~jianchu/STAT480.htm#lecture%20Noteshttp://www.stat.psu.edu/~jianchu/STAT480.htm#lecture%20Notes

http://www.stat.psu.edu/~jianchu/GettingStartted_files/frame.htm

Getting data into the SAS system Working with your SAS data: Part I   Working with your SAS data: Part II Working with multiple SAS data sets Working with statistics

Page 83: Efficient Way to Learn SAS With Virtually No Cost
Page 84: Efficient Way to Learn SAS With Virtually No Cost
Page 85: Efficient Way to Learn SAS With Virtually No Cost
Page 86: Efficient Way to Learn SAS With Virtually No Cost
Page 87: Efficient Way to Learn SAS With Virtually No Cost
Page 88: Efficient Way to Learn SAS With Virtually No Cost

The Pennsylvania State UniversityThe Pennsylvania State University http://www.stat.psu.edu/~dcsteven/stat480/http://www.stat.psu.edu/~dcsteven/stat480/

Quiz 1 (with correct answers)Quiz 2 (with correct answers)

Page 89: Efficient Way to Learn SAS With Virtually No Cost

http://www.sasusers.com/links/defaulthttp://www.sasusers.com/links/default

Information & Resourcesfor SAS® Users

Stats & SAS Links:

General Topics

Page 90: Efficient Way to Learn SAS With Virtually No Cost

http://www.sys-seminar.com/SASArticles.htm http://www.sys-seminar.com/SASArticles.htm

Newsletter “Missing semicolon”SAS Tips Small but useful examples, SAS news Keep your attention from the beginning to

the end

Page 91: Efficient Way to Learn SAS With Virtually No Cost

SAS: the SAS Users' SAS: the SAS Users' Group List (SUG-L)Group List (SUG-L)

What is SUG-L? SUG-L is a listserv-based mailing list for SAS

users throughout the Research Triangle area. The list provides a way for users in the area to

exchange information about SAS problems and questions.

Meetings of The Research Triangle SAS Users Group (RTSUG) are announced on this list.

Page 92: Efficient Way to Learn SAS With Virtually No Cost

SAS Newsgroup SAS Newsgroup compcomp..softsoft--syssys..sassas

This newsgroup and SAS-L are joined(mirrored) sothat the messages sent to one will also be sent to the other.

Deja.com Power Search provides an easy way to read comp.soft-sys.sas and search the archives.

Page 93: Efficient Way to Learn SAS With Virtually No Cost

Philip MasonPhilip Mason http://homepage.ntlworld.com/philipmason/http://homepage.ntlworld.com/philipmason/

SAS Tips and TechniquesSAS related linksSAS Papers

Page 94: Efficient Way to Learn SAS With Virtually No Cost

ConclusionConclusion WEB is a golden mine for a learning WEB plus combination with other

resources will give a best results Complementary ways: - BBU books - SUGI, SESUG, PHARMASUG - SAS Training classes - Attending SAS Local groups - Actively using SUG-L

- WORKING EXPERIENCE

Page 95: Efficient Way to Learn SAS With Virtually No Cost

Mirjana Stojanovic

Statistical programmer

Chapel Hill, NC 27514

[email protected]

Tel: (919) 932-6236