I read here that, when all variables are categorical, log-linear is preferred over logistic regression "because log-linear is merely an extension of the chi-square test." I don't have a stats background and am having trouble deciphering this statement.

Is log-linear is truly preferred when all vars are categorical? Also, why is being "merely an extension of the chi-square test" a good thing?

  • 5
    $\begingroup$ I don't see any reason for preferring a loglinear model. Less obscure and more readily extensible approaches are preferable in my opinion, so logistic regression. See stats.stackexchange.com/a/86722/162986 $\endgroup$ – Heteroskedastic Jim Sep 23 '18 at 14:10
  • $\begingroup$ I'm all for less obscure. Just came across a reference that echos the same sentiment (theanalysisfactor.com/…), saying log-linear is being better for categorical vars but recommending logistic regression or chi-sq instead because they're less "obtuse." $\endgroup$ – buttonsrtoys Sep 23 '18 at 20:34

Good question. (I wouldn't endorse the links you cited in your question or in your first comment.)

There is good information at https://stats.stackexchange.com/a/86722/162986, as @user162986 pointed out. If you are looking for a more intuitive, introductory account, read on.

Either logistic regression or log-linear analysis might be used when all variables are categorical. But it's not true that the latter method is globally preferred.

The two methods answer different types of questions. With logistic regression one identifies, and analyzes relationships with, a single dependent variable (response variable, outcome variable, 'Y'). One might develop a predictive equation for Y based on one or more predictors. In connection with this one might classify each observation as taking one value or another with respect to Y. Alternatively, one might attempt to assess the strength of each predictor in causing Y -- as risky as this is.

With log-linear analysis one treats no single variable as dependent but instead assesses what if any patterns of relationships emerge tying together three or more variables. In this sense log-linear analysis superficially shares something with principal components analysis and exploratory factor analysis. However, a key difference from these data reduction techniques is that log-linear analysis incorporates a statistical significance test of the relationship linking the three or more variables.

It's fair to say that log-linear analysis is "an extension of the chi-square test." Let's ask not so much "why" this would be a good thing, but "when": when we want to know the same thing about three or more variables that we would be seeking via a chi-square test of independence of two -- namely, to what degree they are (in)dependent.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.