Skip to content
Prev 1508 / 20628 Next

using glmer with user-defined link function

You can use a "quasi" family with separate specification of the link
and the variance function but there are only a limited number of
variance functions available.

The reason that the inverse link and the variance functions are
hard-coded in glmer is because the number of evaluations of these
functions is potentially much, much greater than the number of
evaluations involved in fitting a generalized linear model (glm).  As
always, it doesn't matter that much when you have a small to moderate
sample size but it does matter when you have large sample sizes and
for models like IRT (item response theory) models the sample size can
be large indeed (tens of millions is not uncommon since each answer by
each candidate constitutes a distinct response).  It is difficult to
design code that is both efficient on large data sets and is flexible
in terms of the model specification.  In this case I chose to go with
the ability to handle large data sets.

If you have a custom variance function of inverse link function that
you would like to use, you are welcome to contribute the code for
them.  See the C functions lme4_varFunc, lme4_muEta and lme4_devResid
in lme4/src/lmer.c for the currently available code.
On Tue, Oct 21, 2008 at 1:57 PM, Ben Bolker <bolker at ufl.edu> wrote: