Clustering, stratification, and unequal weights in a complex survey affect properties of common categorical data analyses such as chi-square tests and loglinear models. The SURVEYFREQ procedure in SAS® software will estimate contingency tables and conduct chi-square tests of independence that account for features of the survey design. Code and output for the data examples in Chapter 10 of Sampling: Design and Analysis, Third Edition explore features of the SURVEYFREQ procedure for various survey designs. The chapter also shows how to fit loglinear models to data from a complex survey, using a jackknife macro that is presented in Appendix B.