from Beta regression by Willem-Jan de Goeij
Estimation of a beta regression model (logit link function). The parameters are estimated with ML.

example.m
n = 1000;
vBeta = [1;0.5];
phi = 100;
[vy, mX] = betasim(n, vBeta, phi);
betareg(vy, mX);

Contact us at files@mathworks.com