Welcome to STAT 770/BIOS 805, Categorical Data Analysis. This page contains updates to the course syllabus, computer notes from class, homework assignments and important notices. Send any questions to grego@stat.sc.edu

- Syllabus
- Lecture Notes
- Tim Hanson's course web page
- Alan Agresti's support web site
- Instructions for uploading an assignment
- GSS website
- Homework
- Homework 1
- Homework 2
- Homework 3
- Homework 4 and SAS data set for Question 3 (Problem 8.4)

- Homework 1
- Exercises
- Section 1.2 exercise (Categorical data distributions)
- Section 1.3-1.4 computer exercise (Binomial inference)
- Section 1.5 exercise (Multinomial inference)
- Chapter 2 exercise (2x2 design)
- Sections 3.1-3.3 exercise (2-way table test for independence)
- Chapter 3 computer exercise (Tests of ordinal association)
- Chapter 4 computer exercise (Poisson regression)
- Section 5.3 computer exercise (Logit Models)
- Section 5.4 exercise (Multiple Logistic Regression)
- Section 6.2 exercise and data (ROC Curve)
- Section 7.1 exercise and data (Probit regression)
- Section 7.2 exercise (Cumulative Logit Models) (Not assigned)
- Chapter 8 exercise (Loglinear Models)

- Section 1.2 exercise (Categorical data distributions)
- SAS code and notes
- SAS documentation
- Introduction to SAS Studio
- Binomial confidence intervals (Section 1.4)
- SAS code for Chapter 2 contingency table (Measures of Association)
- SAS code for Section 3.1.2 safety belt example
- SAS code for Section 3.1.4 physicians' health example
- SAS code for Table 3.2 belief and education example
- SAS code for Sections 3.1-3.3 group exercise on Christmas Bird Count data (Chi-squared Test of Independence)
- SAS code for Section 3.1-3.4 partitioning of Christmas Bird Count data
- SAS code for partitioning of Binge drinking data
- SAS code for exact test of independence for smoking data
- SAS code for Exact test with SIC data and OSHA SIC search website .
- SAS code for testing linear-by-linear association in GSS data on ideology vs. happiness.
- SAS code for Snoring data (Binary Regression)
- SAS code for Horseshoe Crab data (Poisson Regression)
- SAS code and data set for Horseshoe Crab Zero-inflated Poisson model
- SAS code for Teratology example in 4.7 (Quasi-likelihood)
- SAS code for Chapter 5 Horseshoe Crab analysis (Chapter 5 Logistic Regression)
- SAS code for Logistic Regression with categorial variable (Chapter 5 Logistic Regression)
- SAS code for logistic regression exercise with factors
- SAS data set for logistic regression exercise with factors
- SAS stepwise code to start HW 5.27
- SAS code for Chapter 6 Introduction
- SAS code for Chapter 6 model selection
- SAS code for Chapter 6 model diagnostics
- SAS code for Chapter 6 Cochran-Mantel-Haenszel tests
- SAS code for additional Cochran-Mantel-Haenszel example
- SAS code for Probit and Complementary Log-Log Regression
- Reference and SAS Code for Conditional Logistic Regression.
- SAS code for Generalized Additive Models
- SAS code for Section 6.2 and 7.1 exercise (ROC; Probit and Complementary Log-Log Regression)
- Section 8.1 SAS code (Multinomial Logit Models)
- SAS code for proportional odds model
- SAS code for proportional odds and non-proportional odds models
- SAS code for proportional hazards model
- SAS code for discrete choice model
- SAS code for loglinear analysis of 2 by 2 table.
- SAS code for loglinear analysis of I by J table.
- SAS code for loglinear analysis of 2X2X2 table.
- SAS code for loglinear models using GSS data
- SAS code for residual analysis of Alligator data
- SAS code for loglinear models using Drug Use data
- SAS code for a linear-by-linear association model
- SAS code for marginal homogeneity models using polygraph data
- SAS code for matched pairs and case control data
- SAS code for testing symmetry using Yule's data
- SAS code for symmetry and quasi-symmetry models using polygraph data
- SAS code for kappa measure of agreement
- SAS code and data set for Chapter 12 marginal models
- SAS code from a student project with some useful macro programming.
- SAS code for Chapter 13 binomial mixed effects model (Prime Minister)
- SAS code for binomial mixed effects model (Abortion)
- SAS code for Chapter 13 binomial mixed effects model (Depression)
- SAS code for binomial mixed effects model (Clinical Trial)
- SAS code and data set for Chapter 13 multinomial mixed effects Insomnia example
- SAS code and data set for Chapter 13 Poisson random effects model
- SAS code and data set for Chapter 13 GLIMMIX versus NLMIXED comparision
- SAS code for a population-averaged marginal model using GSS data

- SAS documentation
- R code and notes
- Don Edward's R primer
- Introduction to R
- Poisson Likelihood plot (Section 1.3)
- Exact coverage for Clopper-Pearson CI (Section 1.4)
- Binomial confidence intervals for score and Clopper-Pearson (Section 1.4)
- Verifying the rank of a Multinomial covariance matrix
- R code for a set of functions and sample session demonstrating Clogg, Lindsay, and Rudas's method for mixing an independent table and fully nonparametric table.
- R code for Feral Hog contingency table
- R code for Exact test with SIC data
- R code for the pexact function used in class and on the midterm
- R function for Section 6.5 sample size calculation
- R code for Section 6.5 sample size contour plot
- R code for Section 7.1 exercise (Probit and Logistic Regression)
- R code for Chapter 7 (Generalized Additive Models)
- R code to simulate multinomial probabilties for GPA/OIR example.
- R code for association graphs.
- R code to simulate multinomial data for polygraph examples.
- R code to compute conditional MLE's for marginal effects in a 2^T table.
- R code to compute conditional MLE's for marginal effects in a capture-recapture experiment.
- R code to compute unconditional MLE's for marginal effects in a capture-recapture experiment.

- Don Edward's R primer
- Data sets and other code
- Powerpoint file of feral hog foraging activity
- Tomonori Ishikawa's Excel worksheet for HIV-AIDS Bayes posterior probabilities (See overview of Rapid HIV testing for recommendations on specificity, prevalence and sensitivity and other details
- NC State Unconditional 2x2 web site.
- General information on horseshoe crabs

- Powerpoint file of feral hog foraging activity
- Midterm Exam
- Final Exam
- 2004 final exam
- Tab-delimited text file for Problem 1 of Final Exam
- 2007 final exam
- Tab-delimited text file for Problem 1 of 2007 Final Exam
- 2010 final exam
- Tab-delimited text file for Problem 1 of 2010 Final Exam
- Space-delimited text file (no variable names) for Problem 5 of 2010 Final Exam
- 2019 final exam and Excel Workbook

- 2004 final exam
- Project information

Return to Department of Statistics Home Page