Log-linear models for contingency tables