02 – Nonlinearities & Categorical Independent Variables

Categorical Data Analysis (Soc 681) · Purdue University · Fall 2026

The lecture notes for this section of the course, with the Stata and R code and output for every example. This site contains all the material and code for the course. If you prefer the slides in PDF format and/or the Stata replication do-file, these can be downloaded at: lecture slides · replication code.

2.0 Nonlinear effects

  • In physics, a function is nonlinear if the outcome (y) is not simply the additive product of all of the causes (x’s)
    • This can happen because effects of continuous IVs are not constant
    • This can happen because some effects are contingent upon values of other IVs
  • In applied statistics, we usually distinguish between those two sources:
    • When effects of an IV are not constant we say the effect is nonlinear
      • E.g., The prediction line is not perfectly straight
    • When the effect of one IV is contingent on the effects of another IV, we say the effects are interactive (as opposed to additive)
  • Note everything above is in terms of effects. Linear regression models can—and often do—produce nonlinear effects. They often produce interactive effects. They can even produce nonlinear interactive effects
  • Linear regression coefficients are useful when the effects are linear and additive. But this is a very special case. When effects are nonlinear and/or interactive we need different methods of summarizing and interpreting effects

Contents

Back to top