modeling different rates of success in a Bernoulli model

259 views
Skip to first unread message

Jonathan Judge

unread,
Sep 11, 2018, 2:39:36 PM9/11/18
to R-inla discussion group

I would like to fit a Bernoulli model that separately models the probability of each event, because the true data has a right tail and I have an additional covariate that I believe helps me model that changing probability for each event, and thereby accommodate these outliers with an unusual probability of success that falls outside the range the binomial distribution would anticipate. 


A logical option seems to be the beta-binomial model, with the binomial representing the Bernoulli likelihood and the beta distribution modeling the changing probability.


There may be a few issues.  


First, beta-binomial models are often discussed in terms of finding overdispersion (variance exceeds mean), and I have seen it said that overdispersion cannot exist in a Bernoulli model, only an aggregated binomial.  I do not know if that “rule” affects what I am trying to do here or if it is even correct, but if so, what I am trying to do may not be useful if the beta binomial and the binomial likelihoods end up essentially collapsing to the same thing.


Second, assuming this is a reasonable approach, it is not clear to me how I signal to INLA through the formula interface which covariates I wish to assign to the beta likelihood versus the binomial likelihood, or if I even have the option of doing so separately.  INLA does seem to accommodate multiple likelihoods just fine in general, but I am having difficulty finding a worked example that would relate to what I am trying to do here.    


For purposes of illustration, let’s let y be the output, a be the fixed effects for the binomial likelihood, z be a random effects vector for the binomial likelihood, and have c be the additional fixed effect I wish to fit solely (or also) to the beta distribution that drives changing probabilities of success. 


Also, if there is another or better solution to this problem, in terms of fitting a different distribution or otherwise, I am all ears.  Many thanks.


Jonathan

Helpdesk

unread,
Sep 11, 2018, 3:09:23 PM9/11/18
to Jonathan Judge, R-inla discussion group
very interesting. so if I understand it correctly, you have data from
binomial, where the prob is random, one realisation from each
observation. the distribution for 'prob is controlled also by
covariates as well as additional parameter(s).

?
> --
> 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 post to this group, send email to
> r-inla-disc...@googlegroups.com.
> Visit this group at
> https://groups.google.com/group/r-inla-discussion-group.
> For more options, visit https://groups.google.com/d/optout.

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

Jonathan Judge

unread,
Sep 11, 2018, 4:27:10 PM9/11/18
to he...@r-inla.org, R-inla discussion group
Correct.  The beta distribution can operate in a sort of "empirical Bayesian" way, although I know some people hate that term.  

Under the header of empirical Bayes, here is an example applying the beta-binomial to sports http://varianceexplained.org/r/empirical_bayes_baseball/  and a related link using the gamlss package to specify certain parameters that would help dictate the "beta" part of the beta-binomial process: http://varianceexplained.org/r/hierarchical_bayes_baseball/ 

Thanks,
Jonathan
Reply all
Reply to author
Forward
0 new messages