zero- and one-inflated beta distributions

167 views
Skip to first unread message

Dexter Locke

unread,
Feb 5, 2024, 8:35:00 AM2/5/24
to r-inla-disc...@googlegroups.com
Dear list,

I have an outcome that is a percentage, rescaled to a proportion, so a beta distribution is a likelihood is a natural and appropriate choice. Two questions: 

1) where can I find zero- and/or one-inflated beta distributions? Sometimes I have zeros and/or ones in the outcome of interest.

2) using family = "beta" in the inla() command creates distributions on what scale? Alternatively, how can I get marginal distribution using inla.smarginal() back onto the response scale? What kind of back/transformation is needed for response-scale outputs per predictor?

Thanks for such great software,
Dexter

Helpdesk (Haavard Rue)

unread,
Feb 6, 2024, 1:44:32 AM2/6/24
to Dexter Locke, r-inla-disc...@googlegroups.com
there is no zero/one inflated for beta. since its continous, if you
observe 0 or 1, you know its inflated, so there is no need for one. you
can model the 0's and 1's directly (like with a binary regression) and
the non-0/1's with a beta. so a non-0/1 has two likelihood
contributions, its not 0 or 1, and then its beta.

beta likelihood takes data between 0 and 1, and you have to scale it
accordingly.

beta has also a trunctation argument for handliing cases near zero and 1
better, see the documentation
> --
> 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/CAA%3DSVwEPvZ6npA-3Cg1gtV5riY5WNVehJ0rZHbr6SVx4_SCrwg%40mail.gmail.com
> .

--
Håvard Rue
he...@r-inla.org

high...@highstat.com

unread,
Feb 6, 2024, 2:38:20 AM2/6/24
to R-inla discussion group

Helpdesk (Haavard Rue)

unread,
Feb 6, 2024, 4:29:25 AM2/6/24
to high...@highstat.com, R-inla discussion group

its not that it cannot be done. its acutally a bit of work to do this
right. I do not like much the approach taken in that paper. it could be
done properly if needed, but some cencoring is needed at the end, as in
practice a reported 0 is not necessary a 0. also the behaviour near 0
and 1 will impact the parameterisation, as the density needs to be
somewhat continous near 0 and 1. like for Beta(a,a), we would need 'a <=
1' not to have zero density at the boundaries (before the inflated stuff
is added), which require a specialized parameterisation as the linear
predictor needs to be unconstrained.

its still possible to do not-to-bad with the multilikelihood approach,
with a logistic regression to be in the two tails, and then a beta model
inbetween.

which mean that in the interior, there is 3 likelihood contributions,
not in the 0 tail, not in the 1 tail and then in the beta interior.

in the left, its two, left tail and not in right tail. similar with the
right tail.

yes, it can be done...

On Mon, 2024-02-05 at 23:38 -0800, 'high...@highstat.com' via R-inla

Dexter Locke

unread,
Feb 6, 2024, 10:28:05 AM2/6/24
to Helpdesk, r-inla-disc...@googlegroups.com
Thanks for the explanation, that is conceptually very helpful.

Can you please also point to a multi-likelihood example I can pull from and adapt for a zero-inflated beta, a one-inflated beta, and a zero- and one-inflated beta using two or three likelihoods combined? I'm not sure how to learn the syntax to achieve the proposed idea. 

Many thanks. 

-Dexter


Dexter Locke

unread,
Feb 11, 2024, 7:45:24 AM2/11/24
to Helpdesk, r-inla-disc...@googlegroups.com
So.. something like this: https://becarioprecario.bitbucket.io/spde-gitbook/ch-manipula.html but a zero/one model and a beta model, and the spatial effects?

Thanks, Dexter


Reply all
Reply to author
Forward
Message has been deleted
0 new messages