Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Hypergeometric function
From
Michal Brzezinski <[email protected]>
To
[email protected]
Subject
Re: st: Hypergeometric function
Date
Thu, 21 Jul 2011 23:52:48 +0200
I have a program - gb2ineq - that uses an algorithm developed by Wimp
(1981) to compute 3F2(1) function. The program computes the Gini index
from McDonald's formula and the Generalized Entropy indices according
to methods proposed by Prof. Jenkins in his 2009 paper. It computes
also standard errors using the delta method. For most cases it works
rather fast and accurately, I think, but I have not tested it too much
yet.
I have also some early version of a program implementing an algorithm
computing 2F1 hypergeometric function if the original poster is
interested.
-gb2ineq- can be downloaded using commands:
net from http://coin.wne.uw.edu.pl/mbrzezinski/software
net describe gb2ineq
Michal Brzezinski
Faculty of Economic Sciences
University of Warsaw, Poland
-----------------
References
Jenkins, S.P. (2009). Distributionally-sensitive inequality indices
and the GB2 income distribution. Review of
Income and Wealth, 55 (2), 392-398, DOI:
10.1111/j.1475-4991.2009.00318.x.
Wimp, J. (1981). The computation of 3F2(1). International Journal of
Computer Mathematics, 10 (1), 55-62,
DOI: 10.1080/00207168108803266.
2011/7/21 <[email protected]>
>
> ------------------------------
>
> Date: Wed, 20 Jul 2011 15:09:25 -0400
> From: Austin Nichols <[email protected]>
> Subject: Re: st: Hypergeometric function
>
> Edward Norton <[email protected]>:
> See
> help f_hypergeometric
> http://www.stata.com/help.cgi?f_hypergeometric
> but it depends on the details, probably...
> ssc desc gbgfit
> will link you to a help file that says in part:
> The Gini coefficient is not calculated as this requires
> evaluation of the generalized hypergeometric 3F2, and this
> function is not currently available in Stata. Online evaluators are
> available, at e.g. wolfram.com, where you can plug in specific
> parameter values to calculate the generalized hypergeometric 3F2,
> then use the formula given by McDonald (1984) to calculate the Gini.
>
>
> On Wed, Jul 20, 2011 at 1:19 PM, Edward Norton <[email protected]>
> wrote:
> > Does Stata have a built-in hypergeometric function? The
> hypergeometric
> > function is an infinite series related to differential equations. (I
> do not
> > need the hypergeometric distribution, which is different and related
> to
> > sampling without replacement.)
>
> ---------------
>
> Ed: why do you want a hypergeometric function? (And which one?)
>
> In a private 'development' version of my -gb2fit- on SSC (Austin's
> -gbgfit- is a sibling of this), I have some do file code that calculates
> 3F2 interatively using the series representation, stopping when a
> user-defined convergence is reached. (GB2 is the generalised beta of the
> second kind distribution.) The code is slow, and function evaluation
> could now probably be done more easily in Mata (which didn't exist when
> I wrote the code). But note that for the Gini coefficient, I found that
> it was better not to use McDonald's 3F2-based formulae for the Gini
> coefficient (Econometrica 1984): it was very much faster and just as
> accurate to calculate the Gini directly by numerical integration. [I
> used this method in my 2009 Review of Income and Wealth paper on the
> GB2.] I think James McDonald is now of a similar view -- from
> correspondence with him, and see also his chapter with Ransom in
> "Modeling Income Distributions and Lorenz Curves", D Chotikapanich
> (ed.), Springer, 2008.
>
>
> Stephen
> ------------------
> Professor Stephen P. Jenkins <[email protected]>
> Department of Social Policy and STICERD
> London School of Economics and Political Science
> Houghton Street, London WC2A 2AE, UK
> Tel: +44(0)20 7955 6527
> Survival Analysis Using Stata:
> http://www.iser.essex.ac.uk/survival-analysis
> Downloadable papers and software: http://ideas.repec.org/e/pje7.html
>
>
> Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/