Set disperssion partameter to 1 in gamma regression

132 views
Skip to first unread message

Gabriela Juri

unread,
Mar 24, 2021, 8:24:23 PM3/24/21
to TMB Users
Hi!!
Hello to all.
I have time to an event data as a response variable and two categorical predictors. After intense googling and reading, I got to the conclusion that I should use an exponential distribution. This apparently means a gamma distribution with a dispersion parameter set to 1. I used Gamma(link=log) distribution as it comes with glmmtmb, checked assumptions using dharma package and got the most awful plots in the world... I think the problem is the dispersion parameter... I've read that I can correct the summary but I can't compare mean values in this way.
IS there any way to change this dispersion parameter inside the glmmtmb sentence (or other function78package)? is the exponential distribution supported?

I hope someone can point me in the right direction because I'm feeling very lost..

GaBI

Ben Bolker

unread,
Mar 24, 2021, 8:31:29 PM3/24/21
to tmb-...@googlegroups.com
This is probably more appropriate for another forum (see
https://github.com/glmmTMB/glmmTMB/#where-to-ask-questions; most likely
r-sig-mix...@r-project.org).

The short answer is that you can use the 'map' argument to fix the
value of the dispersion parameter, something like map(betad=NA) . That
fixes the dispersion parameter to its starting value. The dispersion
parameter is modeled on the log scale and I believe its default start
value is so (so dispersion=exp(0)=1, which is what you want).

If you need more help or that doesn't work for some reason (I haven't
tested it!), please follow up on r-sig-mix...@r-project.org ...

cheers
Ben Bolker
> --
> To post to this group, send email to us...@tmb-project.org. Before
> posting, please check the wiki and issuetracker at
> https://github.com/kaskr/adcomp/ <https://github.com/kaskr/adcomp/>.
> Please try to create a simple repeatable example to go with your
> question (e.g issues 154, 134, 51). Use the issuetracker to report bugs.
> ---
> You received this message because you are subscribed to the Google
> Groups "TMB Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to tmb-users+...@googlegroups.com
> <mailto:tmb-users+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tmb-users/ce9b1598-cdd5-47d6-bd93-726ea922a4cfn%40googlegroups.com
> <https://groups.google.com/d/msgid/tmb-users/ce9b1598-cdd5-47d6-bd93-726ea922a4cfn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages