4
$\begingroup$

Does log-linear regression fall into the class of generalized linear models? Here I'm defining "log-linear regression" as the model $\log(y) = x'\beta + \eta$ where $\eta \sim N(0, \sigma^2)$.

Thanks.

$\endgroup$
5
  • $\begingroup$ What does $\eta$ refer here? Error? If so, why do you specify error distribution? $\endgroup$
    – T.E.G.
    Feb 25, 2018 at 5:17
  • $\begingroup$ @T.E.G. Yes, $\eta$ is the noise (not the error). I specify its distribution because this is what makes it "statistics" :-). See cs.princeton.edu/~bee/courses/scribe/lec_09_11_2013.pdf or stat.cmu.edu/~cshalizi/mreg/15/lectures/06/lecture-06.pdf. $\endgroup$
    – ted
    Feb 25, 2018 at 6:22
  • $\begingroup$ Please see my answer below. What you call noise ($\eta$) is not different from error ($\epsilon$) here. See the first link you posted, page 2: $\epsilon \sim N(0, \sigma^2)$. It is also called the error distribution. $\endgroup$
    – T.E.G.
    Feb 25, 2018 at 6:36
  • $\begingroup$ Perhaps the nearest model to yours that would be what is normally counted as a GLM would be a GLM with variance proportional to mean (which implies the Gamma) and log link. $\endgroup$
    – Glen_b
    Feb 25, 2018 at 7:08
  • $\begingroup$ andrewgelman.com/2006/04/10/log_transformat $\endgroup$ Feb 25, 2018 at 9:56

1 Answer 1

1
$\begingroup$

Normally, loglinear models for contingency tables are considered as generalized linear models (Fox 2016). They are sometimes called Poisson regression for contingency tables (Bilder & Loughlin 2015). In the case of Poisson regression, we have a response random variable $Y$, and $p \geq 1$ explanatory variables, $x_1,\dots,x_p$, and for observations $i=1,\ldots,n$, we assume that

$$Y_i \sim Po(\mu_i)$$

where

$$\mu_i = \exp(\beta_0+\beta_1x_{i1}+\ldots+\beta_px_{ip}).$$

So, the generalized linear model has a Poisson random component, linear predictor (systematic component), and link function (log-link):

$$\log(\mu)=\beta_0+\beta_1x_1+\ldots+\beta_px_p.$$

Looks similar to your equation. However, first, you seem to transform the outcome, $y$, directly. So, it looks like you follow what Agresti (2015:6) calls transformed-data approach (i.e., $E[g(y_i)] = \beta_0+\beta_ix_{i1}$ instead of $g[E(y_i)]= \beta_0+\beta_ix_{i1}$, $g$ is the link function). And second, (I think) you specify error distribution, $\eta \sim N(0, \sigma^2)$. As you can see in this answer, in GLMs, "You don't specify the "error" distribution, you specify the conditional distribution of the response." The exception is latent variable approach.

To answer your question: yes, log-linear regression falls into the class of generalized linear models, but your model looks like a linear regression model with a log-transformed outcome.


Agresti, Alan. 2015. Foundations of Linear and Generalized Linear Models. Hoboken, NJ: Wiley.

Bilder, Christopher R. and Thomas M. Loughlin. 2015. Analysis of Categorical Data with R. Boca Raton, London and New York: CRC Press.

Fox, John. 2016. Applied Regression Analysis and Generalized Linear Models. 3rd ed. Los Angeles: Sage Publications.

$\endgroup$
4
  • 2
    $\begingroup$ Thanks for the detailed response. I did in fact mean what I wrote, that $\log(y) \sim N(x'\beta, \sigma^2)$ which I know is different from Poisson regression (which is a GLM). So my question was whether this log-normal linear model was a GLM. But given your response, it seems like it's not since the error distribution is specified rather than the conditional distribution of the response. $\endgroup$
    – ted
    Feb 25, 2018 at 8:44
  • 1
    $\begingroup$ Upon reflection, it seems like my model is a GLM such that $Y \mid (x, \beta, \sigma^2) \sim \text{Lognormal}(x^\top\beta, \sigma^2)$. This is not very deep but it is the conditional distribution of $Y$ given $x$ and the model. $\endgroup$
    – ted
    Feb 25, 2018 at 9:14
  • $\begingroup$ @ted, Well, yes, I think using lognormal as link function works, but this means you move from a transformed-data approach to GLM and, although similar, this is still different from the model in your question. Andrew Gelman's post in generic_user's comment explains this briefly too: "...the key difference being the relation between the predicted value and the variance." $\endgroup$
    – T.E.G.
    Feb 25, 2018 at 15:05
  • $\begingroup$ @ted, Although rather software specific, you might want to check this question: stats.stackexchange.com/questions/21447/… $\endgroup$
    – T.E.G.
    Feb 25, 2018 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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