help mgbe

Title

mgbe -- Multimodel Generalized Beta Estimator

Syntax

mgbe cases min max [, DISTribution(string) AIC BIC AVERAGE SAVing(string) BY(id)]

options

DISTribution(string) Distributions can be chosen from the following: GB2(Generalized Beta Type 2), DAGUM, SM(Singh-Maddala), BETA2, LOGLOG(Loglogistic), GG(Generalized Gamma), GA(Gamma),
WEI(Weibull), PARETO2, LN(Lognormal). If no distribution is specified, the program will run over all ten distributions.

aic The best-fitting distribution will be selected according to the Akaike information criterion (AIC). AIC is the default criterion.

bic The best-fitting distribution will be selected according to the Bayesian information criterion (BIC).

average Estimates will be averaged across distributions, with the average weighted according to the AIC (by default) or BIC.

SAVing(outfile) Save statistics to the output file designated by the saving() option.
Statistics include the mean, median, variance, and various inequality statistics.
Under AIC or BIC model selection, statistics also include the log likelihood (ll), AIC, BIC of the best-fitting model, as well as a likelihood ratio test of fit (G2), with degrees of freedom (df) and p value.
The null hypothesis that the distribution fits the data is typically rejected (p<.05), especially in large datasets, but the distribution can still be a useful approximation.

BY(id) Estimate binned data grouped by id.

Description

mgbe implements 10 Generalized Beta family distributions and uses multimodel inference to obtain estiamtes from the best fitting models.
mgbe assumes that the data are "binned" (a.k.a. grouped, bracketed, interval-censored) so that each row reports how many cases have values in the interval (min,max).
Binned data are commonly used to summarize the distribution of income or wealth across individuals, households, or families.
From the binned data, mgbe estimates summary statistics including the mean, median, standard deviation, Gini, Theil, and other inequality statistics.

mgbe requires Stata/IC or Stata/MP and assumes that the commands savesome and egen_inequal have already been installed. To install those commands, type "ssc install egen_inequal" and "ssc install savesome".

Estimation Details

mgbe accepts three arguments, in order: cases (number of cases per bin), min (lower limit of bin) and max (upper limit of bin).

Only the rightmost bound of each bin can be missing (infinite).

The estimator is described by von Hippel, Scarpino, and Holas (2016).

Example

The following example uses binned data from every US county in 2006-10. It estimates the Gini and other statistics.

use county_bins, clear
keep if fips <= 2000 /* Fit data from Alabama */
by fips: mgbe households bin_min bin_max, dist(DAGUM GG) aic average

Saved Results

mgbe saves estimates to the output file designated by the saving() option. Estimates include the mean, median, variance, various inequality statistics, and quantiles 1-999 from the binned data.

Notes

1. Running over all 10 distributions can be slow. Use fewer distributions for faster runtime. Start by eliminating the Pareto2, Lognormal, and Loglogistic, which are almost never the best-fitting distributions.

2. Running very large datafiles can be slow. Consider breaking large datafiles into smaller pieces.

3. mgbe borrows some code from three programs by Austin Nichols: gbgfit, smgfit, and dagfit. All errors and enhancements are our own.

Authors

Yutong Duan, University of Texas at Austin (yduan@utexas.edu).

Paul T. von Hippel, University of Texas at Austin (paulvonhippel.utaustin@gmail.com).

References

von Hippel, P.T., †Scarpino, S.V., & †Holas, I. (2016). “Robust estimation of inequality from binned incomes.” Sociological Methodology, accepted and published online ahead of print. Also available as arXiv e-print 1402.4061.
http://arxiv.org/abs/1402.4061.