Log-linear models and goodness-of-fit statistics for categorical data in contingency table analysis