How to specify beta distributed response variable in fitglme?

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!

 Réponse acceptée

Ive J
Ive J le 14 Déc 2020
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).

2 commentaires

Yes, I actually forgot to write that it is supposed to be a mixed-effects model as well, as I have repeated measures within subjects. Does this actually make a difference?
Thank you for the link that looks very helpful!
In that case I'm afraid MATLAB fitglme does not support it at the moment. But you can use R glmTMB or GLMMadaptive packages. The other option (if you still wanna use MATLAB) is to assume your reponse under other distributions (a good example here).

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by