MATLAB: How to specify beta distributed response variable in fitglme

beta distributionfitglmegeneralized linear modelglmMATLABregression

Hello!
I want to fit a GLM model, my response variable is a fraction on the interval [0,1]. It's highly negatively skewed with a lot of values close to 1.
From what I've gathered there are a couple of solutions to this. Apart from doing a logit transform on the dependent variable, a different approach is to assume that the response is beta distributed.
So my goal is to use fitglme and specify a beta distributed response, however the only distributions I find in the manual are normal, binomial, poisson, gamma and inverse gaussian.
Do you know of a good way to handle this within Matlab? I saw that there are a couple of nice implementations in R, however I prefer to use Matlab.
Thank you!

Best Answer

I'm not sure why you want to use fitglme while you mentioned GLM (and not mixed-effects model). fitglm does not accept beta distributed response. However you can calculate beta regression estimates (p-values and CI) following this example under Beta Regression Model. Btw, you can easily use R betareg package (and much more that MATLAB doesn't offer).