Skip to content
Prev 18301 / 20628 Next

Another predict/cloglog peculiarity --- lme4 this time (PS)

Apologies.  I see that my Mac mail software has interpreted 'make.link?
as a link that is underlined ? somewhere between going out and being
received at the other end (at least at my end), it was then mangled in
the attempt to give a presumed underlying web address.  Hopefully,
the following should be OK.

The issue under discussion related to any calculation that works with
a cloglog link function, not just mixed models.

The ?crude' way to calculate the inverse function, for eta=3.5, would be:
Observe the following
1-exp(1-exp(eta))                      R linkinv()                          Calc as 1 -
  3.5 0.99999999999999589 0.99999999999999589 1.1283307669739036e-14
  3.6 0.99999999999999989 0.99999999999999978 3.4664362337169868e-16
  3.7 1.00000000000000000 0.99999999999999978 7.3833488826673409e-18
  3.8 1.00000000000000000 0.99999999999999978 1.0490996011645160e-19
  3.9 1.00000000000000000 0.99999999999999978 9.5297924643308894e-22
  4    1.00000000000000000 0.99999999999999978 5.2798210162856661e-24

I?d judge that the maximum returned by rlinkinv = make.link('cloglog')$linkinv
is set to ensure that log(-log(1-mu)) with mu=1 never appears in the calculations,
allowing (but this should at least be documented, and perhaps generate a
warning):
[1] 3.5847307979997631

It is important that predicted values on the scale of the linear predictor
are not thus constrained  ? it can, then, be fatal to calculate them using 
rlinkinv(predict(obj,  type?response?)) !

John Maindonald             email: john.maindonald at anu.edu.au