# GLMs: show me the model!

From: Patrick Cordue <patrick.cordue_at_isl-solutions.co.nz>
Date: Fri, 20 Feb 2009 11:59:32 +1300

I asked a question on GLMs a couple of days ago. In essence I was asking
"what is the model - please write it down - you, know, like for a linear
model: Y = a + bx + e, where e ~N(0,s^2) - can't we do that for a GLM?"

I come from a modelling background where the first step is to "write down
the model"; the second step is to look for tools which will provide
estimates of the unknown parameters; (I am assuming we already have a data
set). If my model is a GLM, then I can just use glm() in R. So, I wanted to
know the form of the GLM models for different families and link functions.
In particular, which implied simple additive errors (Y = mu + e) and which
implied simple multiplicative errors (Y = mu * e)?
(where mu = E(Y))

The answer provided by Murray Jorgensen is correct:

"In glms there is no simple characterisation of how the
systematic and random parts of the model combine to give you the data
(other than the definition of the glm, of course)."

Clearly for discrete distributions, it makes no sense to look for a
"building block" error e which can be added/multiplied to/by the expectation
to provide the response variable. My question was aimed at continuous
distributions.

Murray Smith (from NIWA) provided some useful comments (see below), which, I
think, get to the heart of my question.

However, I deduced the following results from first principles:

For the Gaussian family, Y = mu + e where e ~ N(0, s^2) (and E(Y) = mu =
m(eta) where eta is the linear combination of the explanatory/stimulus
variables, and m^-1 is the link function) is a GLM. I take this to imply
that when one fits a model using glm() with a Gaussian family and any link,
that the implied error structure is additive.

For the Gamma family, Y = mu * e where e ~ Gamma(k, 1/k) is a GLM. I take
this to imply that when one fits a model using glm() with a Gamma family and
any link, that the implied error structure is multiplicative.

For the inverse Gaussian family the implied model does not have a simple
additive or multiplicative error structure (someone might know how to write
down the model in this case - but not me).

Thanks to everyone who provided comments and references.

--------------------------------------

Murray H. Smith wrote:

"In most GLMs the error is neither multiplicative nor additive. Parameterize
the 1-parameter error family by the mean (fixing any dispersion or shape
parameters, which is what pure GLM is with the added constraint that the
error distribution belongs to a 1-parameter exponential family).

We can only write
y ~ mu + e or y ~ mu*e
for e not depending on mu, if mu is a location or scale parameter for the
error family. I.e.
y ~ f( y;mu) where f(y;mu) = f(y - mu; mu =0)
or
y ~ f( y;mu) where f(y;mu) =1/mu* f(y/mu; mu =1)

The variance function V(mu), the variance expressed as a function of the
mean, must be constant for an additive error and proportional to mu^2 for
multiplicative."

```--
-----
Patrick Cordue
Director
Innovative Solutions Ltd
www.isl-solutions.co.nz
----