There are so many cool and wonderful things that you can do in the DATA step in SAS, that it’s really hard to showcase a few of them. So, let’s start by reviewing information the SAS DATA Step from the SASsyFridays blog. Then if we have time, let’s start investigating some of the functions we can use in the DATA Step, DIF() and LAG().
If you have any specific questions, please bring them and we can work through them together.
We will continue our journey with SAS and data, with a workshop that concentrates on data visualization and descriptive statistics. Steps that we would undertake as we being working with our research data.
The notes and accompanying SAS code are available here.
The podcast for this workshop is available here. PLease note that you must have a UGuelph account and you must either be on campus or using the UG VPN to view the podcast.
Before we can start using the SAS program and learn how to write the code and match it to our data and trials, we need to be aware of different versions of SAS that we have access to.
Available Versions of SAS
- PC Standalone Version – PC-SAS or SAS 9.4
- Animal Biosciences department ONLY
- Access the server version of PC-SAS
- SAS University Edition – SAS Studio
- This is free for all academics to use. You can download the free version from https://www.sas.com/en_ca/software/university-edition.html
- This is available for both Mac and Windows users
- Please note, that you will be required to update this version every year. SAS will send you a reminder notice, approximately 1 year from your installation date.
- SAS OnDemand – SAS Studio
- This is also free for academics
- This is SAS’ in the cloud version of the University Edition
- Environment is the same as the University Edition, the difference is that you are using the SAS service in the Cloud, all your files are stored in the Cloud and not on your local system, and you are using their computer resources NOT your own system – accessed through a web browser with your own personal login
What Parts of SAS do you have access to?
SAS is an extremely large and complex software program with many different components. We primarily use Base SAS, SAS/STAT, SAS/ACCESS, and maybe bits and pieces of other components such as SAS/IML.
SAS University Edition and SAS OnDemand both use SAS Studio. SAS Studio is an interface to the SAS program and contains the following components:
- BaseSAS – base SAS programming, DATA Step
- SAS/STAT – the PROCs used for statistical analyses
- SAS/IML – SAS’ matrix programming language
- SAS/ACCESS – allows you to interact with different data formats
- Some parts of SAS/ETS – time series analysis
If you are using the PC or Server SAS versions, you may have access to more than the modules listed above. To see exactly what you have access to, you can run the following code:
You will see the components available to you listed in the log window.
Also note the additional information available to you:
- License information
- Expiration date – very handy to be aware of, especially if you are running your own copy of your PC
- SAS components available to you
What does SAS look like?
There are a number of components to the SAS interface:
- Results and Explorer windows to the left
- Editor, Log, Output, and Results Viewer windows to the right, taking up most of the screen
What do each of these windows do?
- Results Window – a Table of Contents for all of your results.
- Explorer Window – similar to Windows Explorer – allows you to navigate SAS libraries and files
- Editor Window – this is where you will spend most of your time, writing and editing program files
- Log Window – this window is extremely helpful, think of it as your best friend in SAS, it tells you what SAS has done every step of your program and processing
- Output Window – SAS versions 9.2 and earlier, use this window to display all results and output. SAS 9.3 and higher use a new window called the Results Viewer. All the results are presented in an HTML format.
How does SAS work?
SAS is divided into 2 areas:
- DATA step
- PROCs (short for PROCedures)
DATA step is all about data manipulation – one of the key strengths to SAS
PROCs – this is where you will find most of your statistical procedures.
Let’s Get Started with Reading Data
Notes to Reading Data into SAS are available as a PDF document. Please download and save on your laptop.
Video of the Workshop
Oh yes! It is that time of year again 🙂 I have to admit that I love fall – my favourite season. The time for so many new beginnings. With this all in mind, the new schedule for F19 OACStats workshops is now open for registration at https://oacstats_workshops.youcanbook.me/. Workshops will be approximately 3 hours long with breaks and hands-on exercises – so bring your laptops with the appropriate software installed. Please note that the workshops are being held in Crop Science Building Rm 121B (room with NO computers) and will begin at 8:30am.
September 10: Introduction to SAS
September 17: Introduction to R
October 15: Getting comfortable with your data in SAS: Descriptive statistics and visualizing your data
October 29: Getting comfortable with your data in R: Descriptive statistics and visualizing your data
November 5: ANOVA in SAS
November 15: ANOVA in R
I am also trying something new this semester – to stay with the theme of new beginnings 🙂 Tutorials! These will be held on Friday afternoons from 1:30-3:30 – sorry only time I could get a lab that worked with all the schedules. They will be held in Crop Science Building Rm 121A (room with computers). Topics will jump around a bit with time to review and work on Workshop materials. To register for these please visit: https://oacstatstutorials.youcanbook.me/
September 13: Saving your code and making your research REPRODUCIBLE
Cancelled: September 20: Introduction to SPSS
September 27: Follow-up questions to Intro to SAS and Intro to R workshops
October 18: More DATA Step features in SAS
October 25: More on Tidy Data in R
November 1: Open Forum
November 15: Questions re: ANOVAs in SAS and R
November 29: Open Forum
I hope to see many of you this Fall!
One last new item – PODCASTS. I’ll be trying to record the workshops and tutorials. These will be posted on the new page and heading PODCASTS. I will also link to them in each workshops post.
Welcome back and let’s continue to make Stats FUN