SAS ‘interface’ editor, log, output menus/tabs “Solutions” tab (look it over to see what SAS can do) “Help” tab - for any of R, SAS, WinBUGS the internet.

Slides:



Advertisements
Similar presentations
Axio Research E-Compare A Tool for Data Review Bill Coar.
Advertisements

The INFILE Statement Reading files into SAS from an outside source: A Very Useful Tool!
SAS Programming:File Merging and Manipulation. Reading External Files (review) data barf; * create the dataset BARF; infile ’s:\mysas\Table7.1'; * open.
Scheduling Discoverer Reports Scheduling Standard Reports Printing & Re-printing Standard Reports Focus on Reports Session 2 To print: Right click Choose.
Introduction to SAS Programming Christina L. Ughrin Statistical Software Consulting Some notes pulled from SAS Programming I: Essentials Training.
Statistics in Science  Introducing SAS ® software Acknowlegements to David Williams Caroline Brophy.
Today: Run SAS programs on Saturn (UNIX tutorial) Runs SAS programs on the PC.
Permanent Formats and Working Across Platforms. 32bit vs. 64 bit SAS The different versions of SAS optimize datasets and formats to work as fast as possible.
Basic And Advanced SAS Programming
A Visual Introduction to PC SAS. Start SAS by double-clicking on the SAS icon...
Using Proc Datasets for Efficiency Originally presented as a Coder’s NESUG2000 by Ken Friedman Reviewed by Karol Katz.
1 Peter Fox Data Analytics – ITWS-4963/ITWS-6965 Week 3b, February 7, 2014 Lab exercises: datasets and data infrastructure.
Understanding SAS Data Step Processing Alan C. Elliott stattutorials.com.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
The New SAS Engine For CRSP   Benefits of using SAS engine for CRSP   Setting up the interface between SAS and CRSP   Examples of use   Performance.
SAS Workshop Lecture 1 Lecturer: Annie N. Simpson, MSc.
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
An Animated Guide©: Sending SAS files to Excel Concentrating on a D.D.E. Macro.
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
Knowing Understanding the Basics Writing your own code SAS Lab.
Transferring VMS SAS/SPSS Data to UNIX Jeff Hayes Social Science Computing Co-op February 26, 1999.
Bringing Data into SAS From Menu: –File –Import Data –Spreadsheet example first Pick file by browsing Select Library and Member (we will talk about this.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
Lesson 2 Topic - Reading in data Chapter 2 (Little SAS Book)
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
How to start using SAS Tina Tian. The topics An overview of the SAS system Reading raw data/ create SAS data set Combining SAS data sets & Match merging.
Using FrontPage FrontPage is a great Web editing tool for people with limited knowledge and time for HTML coding. It’s similar to using Microsoft Word.
Lesson 8 - Topics Creating SAS datasets from procedures Using ODS and data steps to make reports Using PROC RANK Programs in course notes LSB 4:11;5:3.
SAS for Data Management and Analysis
An Introduction Katherine Nicholas & Liqiong Fan.
BMTRY 789 Lecture 6: Proc Sort, Random Number Generators, and Do Loops Readings – Chapters 5 & 6 Lab Problem - Brain Teaser Homework Due – HW 2 Homework.
An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 5 & 6 By Ravi Mandal.
Beautiful PROC CONTENTS Output Using the ODS Excel Destination Suzanne Dorinski SESUG 2015 Disclaimer: Any views expressed are those of the author and.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 3 & 4 By Tasha Chapman, Oregon Health Authority.
BSHS 342 Week 2 Individual Observation of a Child Observe a child between the ages of 2 and 9, and record your observations on the observation form Check.
Chapter 11 Reading SAS Data
What Should I Do if My Style Is Not Included?
Getting Started with R.
This Week Review of estimation and hypothesis testing
SAS Programming Introduction to SAS.
Jayne Tierney1, Angelo Tinazzi2 Sarah Burdett1,Lesley Stewart3
SAS Programming I Matthew A. Lanham Doctoral Student
How to Import an Excel File
Lab 1 Introductions to R Sean Potter.
Match-Merge in the Data Step
Tamara Arenovich Tony Panzarella
Lab 2 Data Manipulation and Descriptive Stats in R
Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps.
Quick Data Summaries in SAS
Beautiful PROC CONTENTS Output Using the ODS Excel Destination
%SUBMIT R A SAS® Macro to Interface SAS and R
Introduction to DATA Step Programming SAS Basics II
SAS Libname Quiz (You have 5 mins to complete, fill in the blanks)
Bring the Vampire out of the Shadows: Understanding the RETAIN and COUNT functions in SAS® Steve Black.
Introduction to DATA Step Programming: SAS Basics II
Lisa Mendez, PhD & Andrew Kuligowski
Program Testing and Performance
PhUSE 2010 Section: Coding Solutions: Paper CS01   SAS® Drug Development Program Portability Ben Bocchicchio, SAS Institute, Cary NC, US James McDermott,
Detecting Runtime Errors and Exiting from Nested Macros Gracefully
Microsoft Word 2013 Part I.
Purpose Real life scenario: I have a set of reports to refresh every month but data is only available at any day during Day 3 – 5 at beginning of each.
Making Remote Processing Less Remote
Sending Communications: More options
File Sharing and Processing Grouped Data
Data Manipulation (with SQL)
Instructor: Raul Cruz 9/4/13
Hans Baumgartner Penn State University
Introduction to SAS Essentials Mastering SAS for Data Analytics
Presentation transcript:

SAS ‘interface’ editor, log, output menus/tabs “Solutions” tab (look it over to see what SAS can do) “Help” tab - for any of R, SAS, WinBUGS the internet has some very useful info but exercise a bit of caution when ‘unofficial’ help – www.sas.com, www.r-project.org, www.mrc-bsu.cam.ac.uk/bugs/, www.ats.ucla.edu/stat

Reading in Data Interactively (demonstration) SAS data sets with libnames libname in 'C:\Documents and Settings\WHALEN\Desktop' access=readonly; options nofmterr; Look at log

Writing out Data Interactively (demonstration) Exporting SAS dataset in a portable format libname outto xport 'C:\Documents and Settings\WHALEN\Desktop\neweff.xpt' ; proc copy in=work out=outto; select eff; run; Look at log

Data Steps Subsetting some variable and observations data a; set in.eff; keep subjid rxgp age status week slpchg sleep0; if itt=1 and week=99; run; Look at log

Data Steps Creating new variables data b; set in.eff; keep subjid rxgp age status slpchg sleep0 slpchg2 slpchg3; if itt=1 and week=99; if status='Completed' then slpchg2=slpchg; else slpchg2=0.1; slpchg3=slpchg*(status='Completed') + 0.1*(status ne 'Completed'); run; Look at log

Viewing and Checking Data View data interactively (demonstration) proc print data=b; where slpchg2=0.1; run; proc print data=b; where slpchg2 ne slpchg3; run; Look at log

Data Step Functions Similar functions as in R or others data c; set in.eff; keep subjid rxgp age status sleep0 logslp0 log10sp0 expslp0; where itt=1 and week=99; logslp0=log(sleep0); log10sp0=log10(sleep0); * longer names in later SAS ver.; expslp0=exp(sleep0); run;

Data Steps Creating new observations data d; set in.eff; keep subjid rxgp age status slpchg slpchg2 sleep0; if itt=1 and week=99 then do obnew=1 to 3; slpchg2=round(slpchg+ 0.5*normal(0),0.01); output; end; run; Look at log