reparametrized Gamma distribution for 'family'

90 views
Skip to first unread message

Reza Hajipour

unread,
Mar 14, 2024, 1:16:41 AM3/14/24
to R-inla discussion group
Hello
I want to use a reparametrized gamma distribution and use it as "family" in inla, as follows:

if Gamma (a, b) then y ~ Gamma (g(a), g(a,b)),   g(a) is a function of 'a' and g(a, b) is a function of 'a' and 'b'. 

formula <- y ~ 1+ X + f(ID.zone, model="bym", graph=graph) + f(ID.year, model="rw2") 

model <- inla (formula, family= "Gamma", 
                 data=data,
                 offset = log(E),
                 control.predictor=list(compute=TRUE),
                 control.compute= list(dic=TRUE, waic = TRUE))

How can I change the parameters of Gamma distribution to g(a) and g(a, b)?

Havard Rue

unread,
Mar 14, 2024, 1:50:36 AM3/14/24
to R-inla discussion group, Reza Hajipour
Can you send me the full details ?

-- 
Håvard Rue 
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/4d657a1e-75ba-4d2b-a133-6fb87f284c82n%40googlegroups.com.

Reza Hajipour

unread,
Mar 14, 2024, 2:10:42 AM3/14/24
to R-inla discussion group
I want to use the modal gamma regression with varying precision as mentioned in the "Bourguignon M, Leão J, Gallardo DI. Parametric modal regression with varying precision. Biom J. 2020 Jan;62(1):202-220. doi: 10.1002/bimj.201900132. Epub 2019 Oct 29. PMID: 31660649." page 3.

if Gamma (a, b) then y ~ Gamma (a', b')
a' = 1+ (sqrt(Q(Q+4))+Q)/2
b' = (sqrt(Q(Q+4))+Q)/2m
where m = (a-1)/b and Q = (a-1)^2/a

Reza Hajipour

unread,
Mar 15, 2024, 1:40:57 AM3/15/24
to R-inla discussion group

Dear Prof. Havard,

I am seeking your assistance regarding reparameterizations for the gamma distribution in INLA. Could you please guide me on how to perform these reparameterizations and whether they are sensible?

Thank you in advance for your help.


Helpdesk (Haavard Rue)

unread,
Mar 16, 2024, 10:33:38 PM3/16/24
to Reza Hajipour, R-inla discussion group

I guess they are sensible if its based on the paper you share earlier.
> https://groups.google.com/d/msgid/r-inla-discussion-group/9c830ecc-bfb1-4341-bdb5-768d6ee3056en%40googlegroups.com
> .

--
Håvard Rue
he...@r-inla.org
Reply all
Reply to author
Forward
0 new messages