How to specify beta distributed response variable in fitglme?
7 views (last 30 days)
Show older comments
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!
0 Comments
Accepted Answer
Ive J
on 14 Dec 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 Comments
Ive J
on 15 Dec 2020
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).
More Answers (0)
See Also
Categories
Find more on Gaussian Process Regression in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!