# Why do we use natural logarithm in categorical outcome variables

I'm reading a chapter on categorical outcome variables (chi-square & log linear analysis) and the author, in an effort of fitting a linear model, said that because the outcome variable is a categorical one, we have to use log values. So the model changed from :

outcome = (b0 + b1*variable_a + b2*variable_b + b3*interaction) + error

to : ln (outcome) = ln(model) + ln(error)

• The outcomes are counts of the number of cases that fall into combinations of categories — also known as contingency tables. I believe that the log in loglinear is the log of a ratio of expected versus actual counts for each cell in the contingency table, so I’m not sure how your restatement is correct. I could be wrong, but are you sure your question is properly stated? Apr 30, 2019 at 22:34

As @Wayne above stated, the outcomes are counts. Counts are strictly non-negative, and so must be the modelled means. The $$\log$$ serves to make sure that all modelled means are positive, as its inverse transformation ($$\exp$$) has a positive range.