Mosaics Visualizing Categorical Data with SAS and R Mosaics

Michael Friendly
SCS Short Course: Feb-Mar, 2010, 2011, 2012, 2013, 2016
Spring Seminar, Cologne: Mar 16-20, 2009


This document provides resources and my short course notes for Visualizing Categorical Data with SAS and R, offered through

General Resources

SAS R

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 vcd-workshop.zip archive. Some of the SAS scripts now require SAS 9.3 for ODS graphics.

Topics & lecture notes sasSAS files RR files knitR
1. Introduction & overview
 1.1 Overview: Categorical data & graphics
 1.2 Discrete distributions
 1.3 Testing association

discrete.sas
berkeley-freq.sas
sexfun-cmh.sas

discrete.R
berkeley-freq.R
sexfun-chisq.R [knitR]
2. Two-way and n-way tables
 2.1 2 x 2 tables
 2.2 Two-way tables
 2.3 Observer agreement
 2.4 Correspondence analysis

berk-4fold.sas
vision-sieve.sas
msdiag-agree.sas
mental-ca.sas

berk-4fold.R [knitR]
vision-sieve.R [knitR]
msdiag-agree.R [knitR]
mental-ca.R [knitR]
3. Mosaic displays & loglinear models
 3.1 n-way tables: Models & graphs
 3.2 Mosaics software
 3.3 Structured tables
berkeley-glm.sas
titanic-loglin.sas
mentgen2.sas
vision-quasi.sas
berkeley-glm.R [knitR]
titanic-loglin.R [knitR]
mental-glm.R [knitR]
vision-quasi.R [knitR]
4. Logit models & logistic regression
 4.1 Logit models
 4.2 Logistic regression models
 4.3 Effect plots
 4.4 Influence & diagnostic plots
berkeley-logit.sas
arthritis-logistic.sas
cowles-logistic.sas
Arrests-logistic.sas
cowles-effect.sas
Arrests-effect.sas
berkeley-diag.sas
berkeley-diag-ods.sas
berkeley-logit.R [knitR]
arthritis-logistic.R [knitR]
cowles-logistic.R [knitR]
Arrests-logistic.R [knitR]
cowles-effect.R [knitR]
Arrests-effects.R [knitR]
berkeley-diag.R [knitR]
arthritis-diag.R [knitR]
5. Polytomous response models
 5.1 Proportional odds models
 5.2 Nested dichotomies
 5.3 Generalized logits
arthritis-propodds.sas
arthritis-propodds-ods.sas
wlf-nested.sas
wlf-glogit.sas
arthritis-propodds.R [knitR]

wlf-nested.R [knitR]
wlf-glogit.R [knitR]

Further reading

Discrete Data Analysis with R Visualizing Categorical Data

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 R-code 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:


© 2009 Michael Friendly
Email:
<friendly AT yorku DOT ca>