[R-sig-ME] Offset vs fixed factor in a mixed poisson model
Ben Bolker
bbolker at gmail.com
Thu Jan 17 17:15:57 CET 2013
<v_coudrain at ...> writes:
> I am tested the effect of a factor on a count variable using a
> poisson mixed model. I know that my response variable is linearly
> influenced by an other variable so that I would like to remove the
> effect of this second variable to see the true effect of my
> factor. In an anova, it is usual to enter the covariable first in
> the model and use a sequential test (type I SS). However I am a bit
> confused how to control for this covariable in my mixed-poisson
> model. If I just give the covariable as an additional fixed
> variable, my factor is highly significant. If I put it instead as an
> offset, the factor is not significant at all. I think that it is
> better to use offset, but I must admit that the underlying "theory"
> is not clear for me. I was also wondering if we can specify multiple
> offsets and if there was some "rule of thumb" in the maximal number
> that can be included. Thank you very much. Best, Valerie
You can specify as many offsets as you want. The distinction
between an offset and a covariate is that an offset is entered
in the equation *exactly as is*, while a covariate has an estimated
parameter associated with it. For example,
y ~ x1 + offset(log(x2))
would fit the model
y ~ Poisson(lambda=exp(b_1*x1+log(x2))) =
Poisson(lambda=x2*exp(b_1*x1))
whereas
y ~ x1 + log(x2)
would fit the model
y ~ Poisson(lambda=exp(b_1*x1+b_2*log(x2))) =
Poisson(lambda=exp(b_1*x1+b_2*log(x2)) =
Poisson(lambda=x2^b_2*exp(b_1*x1))
(the log() are not required but are quite common when
specifying offsets, because that's the way to correct
for a scaling that is known to be proportional; using
y ~ x1 + offset(x2) would give lambda=exp(x2)*exp(b_1*x1)
which is not usually what's desired).
In your case, if the estimated parameter b_2 for the covariate
would be nowhere near 1.0, then your offset version is probably
not accounting properly for the effects of the covariate.
Ben Bolker
More information about the R-sig-mixed-models
mailing list