Nonrandom mixing can significantly alter the diffusion path of an infectious disease such as AIDS that requires intimate contact. Recent attempts to model this effect have sought a general framework capable of representing both simple and arbitrarily complicated mixing structures, and of solving the balancing problem in a nonequilibrium multigroup population. Log-linear models are proposed here as a general framework for solving the first problem. This approach offers several additional benefits: The parameters used to govern the mixing have a simple, intuitive interpretation, the framework provides a statistically sound basis for the estimation of these parameters from mixing-matrix data, and the resulting estimates are easily integrated into compartmental models for diffusion. A modified selection model is proposed to solve the second problem of generalizing the selection process to nonequilibrium populations. The distribution of contacts under this model is derived and is found to satisfy the assumptions of statistical inference for log-linear models. Together these techniques provide an integrated and flexible framework for modeling the role of selective mixing in the spread of disease.