Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: update betafit available from SSC

From   Maarten buis <>
To   stata list <>
Subject   st: update betafit available from SSC
Date   Fri, 8 Apr 2011 16:10:50 +0100 (BST)

Thanks to Kit Baum an update of the 
-betafit- package is now available from SSC. To 
install type in Stata:
-ssc install betafit, replace- or 
-adoupdate, update-.

-betafit- fits by maximum likelihood a beta-
distribution with or without covariates to data. 
One of the key characteristics of the the beta-
distribution is that it is a fairly flexible 
distribution for variables that are bounded 
between 0 and 1. It can thus be used to model 
proportions or other bounded variables, and 
optionally how they depend on explanatory/
independent/right-hand-side/x variables.

This update contains the following changes:

o After estimating a -betafit- model one can 
  predict 3 new types of residuals: working 
  residuals, partial residuals, and score 

o For users who have Stata 11 or higher: -betafit- 
  allows factor variables and with that also the 
  use of -margins- as a post-estimation tool.

o -betafit- can display results as "relative 
  proportion ratios", that is, as exponentiated 
  coefficients. A discussion on relative 
  proportion ratios is included in the help file.

-betafit- has a relatively long history with input
from various authors.

In 1997 Nick Cox wrote a -beta- for fitting a beta
distribution by ML without covariates. This program 
is still part of -betafit- as -beta4-, and it 
should work with Stata 4 upwards. This didn't use
-ml-: it was a fairly straight port of an algorithm
published in Journal of Applied Meteorology by 
P.W. Mielke in 1975. 

In 2003, riding on the back of some work by Stephen 
Jenkins on other distributions, Nick Cox wrote a new 
-betafit- that now took covariates if specified. But 
it stuck to the parameterisation of a beta 
distribution in terms of two shape parameters. 

Every now and again threads on Statalist ask what 
should be done when the response is a continuous 
proportion between 0 and 1, and sooner or later 
someone mentions the beta distribution as one
possibility, but that that the then existing 
parameterisation of -betafit- was not particularly 
useful for problems with covariates. 

In 2005 I came on board, taking the initiative
in implementing an extra parameterisation in terms
of a location and a scale parameter. Since then I
have initiated various extensions to the program 
like adding capabilities to compute marginal effects 
(2006), allow the use of -predict- (2008), and the 
latest update that became available today. -betafit- 
is now attributable to Buis, Cox, and Jenkins. 

I hope that some of you will find it useful,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index