------------------------------------------------------------------------------- help forinvgammafit-------------------------------------------------------------------------------

Fitting a two-parameter inverse gamma distribution by maximum likelihood

invgammafitvarname[weight] [ifexp] [inrange] [,alphavar(varlist1)betavar(varlist2)robustcluster(clustervar)level(#)maximize_options]

by...:may be used withinvgammafit; see help by.

fweights andaweights are allowed; see help weights.

Description

invgammafitfits by maximum likelihood a two-parameter inverse gamma distribution to a distribution of a variablevarname. The distribution has probability density function for variable x > 0, shape parameter a > 0 and scale parameter b > 0 of (b^a / Gamma(a)) x^(-a - 1) exp(-b / x).

Options

alphavar(varlist1)andbetavar(varlist2)allow the user to specify each parameter as a function of the covariates specified in the respective variable list. A constant term is always included in each equation.

robustspecifies that the Huber/White/sandwich estimator of variance is to be used in place of the traditional calculation; see[U] 20.14Obtaining robust variance estimates.robustcombined withcluster()allows observations which are not independent within cluster (although they must be independent between clusters).

cluster(clustervar)specifies that the observations are independent across groups (clusters) but not necessarily within groups.clustervarspecifies to which group each observation belongs; e.g.,cluster(personid)in data with repeated observations on individuals. See[U] 20.14 Obtaining robust variance estimates. Specifyingcluster()impliesrobust.

level(#)specifies the confidence level, in percent, for the confidence intervals of the coefficients; see help level.

nologsuppresses the iteration log.

maximize_optionscontrol the maximization process; see help maximize. If you are seeing many "(not concave)" messages in the log, using thedifficultoption may help convergence.

RemarksThis distribution is also described as the inverted gamma, the reciprocal gamma, a Pearson Type V distribution and the Vinci distribution.

Saved resultsIn addition to the usual results saved after

ml,invgammafitalso saves the following, if no covariates have been specified:

e(alpha)ande(beta)are the estimated inverse gamma parameters.The following results are saved regardless of whether covariates have been specified:

e(b_alpha)ande(b_beta)are row vectors containing the parameter estimates from each equation.

e(length_b_alpha)ande(length_b_beta)contain the lengths of these vectors. If no covariates are specified in an equation, the corresponding vector has length equal to 1 (the constant term); otherwise, the length is one plus the number of covariates.

Examples

. invgammafit mpg

AuthorsNicholas J. Cox, Durham University n.j.cox@durham.ac.uk

Stephen P. Jenkins, London School of Economics s.jenkins@lse.ac.uk

AcknowledgmentsMaarten Buis found a long-lurking bug.

ReferencesEvans, M., Hastings, N. and Peacock, B. 2000.

Statistical distributions.New York: John Wiley.Jeffreys, H. 1961.

Theory of probability.Oxford: Oxford University Press (see p.77).Kleiber, C. and Kotz, S. 2003.

Statistical size distributions ineconomics and actuarial sciences.Hoboken, NJ: John Wiley.

Also seeOnline: help for pinvgamma (if installed), qinvgamma (if installed)