Visualizing Categorical Data with SAS and R
Michael Friendly
SCS Short Course: FebMar, 2010, 2011, 2012, 2013, 2016
Spring Seminar, Cologne: Mar 1620, 2009
This document provides resources and my short course notes
for Visualizing Categorical Data with SAS and R,
offered through
General Resources
Lecture notes and workshop files
The exercises for each workshop are described in VCD Workshop exercises.
All SAS data sets are contained in the SAS macro programs and data sets (vcdprog.zip) archive.
R data sets are contained in the various R packages. To save typing, scripts for some of the
exercises are linked below. These scripts are also available in a vcdworkshop.zip archive.
Some of the SAS scripts now require SAS 9.3 for ODS graphics.
Further reading
The main source for these materials is my new book,
Discrete Data Analysis with R: Visualization and Modeling Techniques for Categorical and Count Data.
The web site for the book contains all the Rcode from the chapters.
For SAS users, I recommend my older book
Visualizing Categorical Data,
covering similar ground.
If you want to learn more about categorical data analysis, there are several
books and other resources I recommend:
 Agresti, A. (1990). Categorical Data Analysis. NY: Wiley.
There is also a
manual for R and Splus users
to accompany this text.
 Christensen, R. (1990). LogLinear Models and Logistic Regression. SpringerVerlag.
 Everitt, B. S. (1992). The Analysis of Contingency Tables,
London: Chapman & Hall (Monograph 45).
 Stokes, M.E., Davis, C.S., and Koch, G.S. (2012). Categorical Data Analysis Using SAS, Third Ed.. Cary, NC: SAS Institute.
A practical guide to these topics using SAS, though without much emphasis on graphical methods.
 Robert Hanneman's
Generalized Linear Models
 Fox, John. Applied Regression Analysis and Generalized Linear Models, 3rd Ed.
Sage, 2015. An excellent treatment of Generalized Linear Models.

Fox & Weisberg An R Companion to Applied Regression,
2nd Ed., Sage, 2011. There is also a web page for the book,
containing data files, R scripts and a collection of web appendices on other topics.
© 2009
Michael Friendly
Email: <friendly AT yorku DOT ca>