fbglm {fbglm} | R Documentation |
Fit a fractional binomial regression model via maximum likelihood.
fbglm(y, x)
y |
A response vector. |
x |
A data frame with covariates. |
Fractional binomial distribution can be considered as zero-inflated, over-dispersed binomial model, and it has three parameters
(p,H,c)
in addition to the number of trials n
.
We use a specific parametrization such that p,H,c \in (0,1)
, and
regress these parameters with logit link on the covariates, while letting n
as the maximum of the response y
.
A list of log-likelihood, estimated coefficients, and maximum likelihood estimation results.
Breece, C. and Lee, J. (2024) Fractional binomial regression model for count data with excess zeros.https://arxiv.org/html/2410.08488v1
library(agridat)
library(bbmle)
sample<-sample(270, 30)
my_y<-ridout.appleshoots$roots[sample]
my_x<-data.frame(pho=ridout.appleshoots$pho[sample])
fbglm(y=my_y, x=my_x )