[R-sig-ME] predict.glmmTMB when "cloglog" link is used.
Rolf Turner
r@turner @end|ng |rom @uck|@nd@@c@nz
Sun Mar 22 09:01:34 CET 2020
Please consider the follow examples:
library(glmmTMB)
X <- dget("demoDat.txt")
fit1 <- glmmTMB(cbind(Dead,Alive) ~ (0+Trt)/Dose +
(Dose|Rep),family=binomial(link="logit"),data=X)
fit2 <- glmmTMB(cbind(Dead,Alive) ~ (0+Trt)/Dose +
(Dose|Rep),family=binomial(link="cloglog"),data=X)
p1 <- predict(fit1,type="response")
p2 <- predict(fit2,type="response")
The vector p1 appears to have "reasonable" entries i.e. they look (as
they should) like probabilities:
>> p1 > [1] 0.019609546 0.194977679 0.745729561 0.972612901 0.994688457
0.998988370
> [7] 0.999807998 0.999963583 0.022220571 0.120654723 0.833383226 0.967947980
> [13] 0.994545468 0.999092456 0.999975082 0.106684473 0.261453062 0.512048780
> ....
The entries of p2 do not seem "reasonable". In particular they all less
than or equal to zero:
>> p2
> [1] -3.244681e+00 -1.597702e+00 -3.235952e-01 -6.683303e-04 -7.662901e-11
> [6] -5.930060e-33 -2.134861e-103 0.000000e+00 -3.360384e+00 -2.201879e+00
> [11] -3.222809e-01 -1.400287e-02 -6.947338e-07 -3.769347e-21 -2.254755e-225
> ....
Am I misunderstanding something, or is there a bug in predict.glmmTMB?
The data set in question is attached as "demoDat.txt".
Thanks for any enlightenment.
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: demoDat.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20200322/29abe03f/attachment.txt>
More information about the R-sig-mixed-models
mailing list