betafit

Authors: Maarten L. Buis, Nicholas J. Cox, and Stephen P. Jenkins

Stata program fitting a two parameter beta distribution, optionally dependent on covariates. The beta distribution is a flexible model for a dependent variable that is bounded between zero and one, for example a proportion. betafit allows two parameterizations, besides the traditional parameterization in terms of two shape parameters it also alows a more interpretable alternative (regression-like) parameterization in terms of a location and scale parameter, which was independently proposed by Philip Paolino (2001), Silvia Ferrari and Francisco Cribari-Neto (2004), and Michael Smithson and Jay Verkuilen (2006).

This package can be installed by typing in Stata: ssc install betafit

Supporting materials

References

Ferrari, S.L.P. and Cribari-Neto, F. (2004). Beta regression for modelling rates and proportions. Journal of Applied Statistics 31(7): 799-815.

Paolino, P. (2001). Maximum likelihood estimation of models with beta-distributed dependent variables. Political Analysis 9(4): 325-346. link

Smithson, M. and Verkuilen, J. (2006) A better lemon squeezer? Maximum likelihood regression with beta-distributed dependent variables. Psychological Methods 11(1): 54-71.

Example

. use http://fmwww.bc.edu/repec/bocode/c/citybudget.dta, clear (Spending on different categories by Dutch cities in 2005)

. betafit governing , mu(minorityleft noleft )

initial: log likelihood = 718.24584 rescale: log likelihood = 718.24584 rescale eq: log likelihood = 718.24584 Iteration 0: log likelihood = 718.24584 Iteration 1: log likelihood = 732.19835 Iteration 2: log likelihood = 738.15983 Iteration 3: log likelihood = 738.1705 Iteration 4: log likelihood = 738.1705

ML fit of beta (mu, phi) Number of obs = 394 Wald chi2(2) = 40.19 Log likelihood = 738.1705 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- minorityleft | -.0407548 .0639882 -0.64 0.524 -.1661693 .0846598 noleft | .2520844 .0631474 3.99 0.000 .1283178 .375851 _cons | -2.332194 .0539375 -43.24 0.000 -2.43791 -2.226479 -------------+---------------------------------------------------------------- /ln_phi | 4.013526 .0715673 56.08 0.000 3.873256 4.153795 -------------+---------------------------------------------------------------- phi | 55.34165 3.960652 48.09876 63.6752 ------------------------------------------------------------------------------

.

[do-file]