------------------------------------------------------------------------------- help forinvgaussfit-------------------------------------------------------------------------------

Fitting a two-parameter inverse Gaussian distribution by maximum likelihood

invgaussfitvarname[weight] [ifexp] [inrange] [,muvar(varlist1)lambdavar(varlist2)robustcluster(clustervar)level(#)maximize_options]

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

fweights andaweights are allowed; see help weights.

Description

invgaussfitfits by maximum likelihood a two-parameter inverse Gaussian distribution to a distribution of a variablevarname. The distribution has probability density function for variable x > 0, location parameter m > 0 and scale parameter l > 0 of (l / 2 pi x^3)^(1/2) exp((-l (x - m)^2 / 2 m^2 x)).

Options

muvar(varlist1)andlambdavar(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.

RemarksThe inverse Gaussian appears in various guises in other Stata model fit commands, but none is identical to that here. glm with identity link and inverse Gaussian family is similar except that the parameterisation is different; the scale parameter is there treated as ancillary, and thus the definition of likelihood is quite different; and

glmdoes not allow the scale parameter to depend on covariates. Various programs by Joseph Hilbe (Hilbe 2000 and later work on SSC accessible using findit and ssc) wire in log link functions. Finally, the use of inverse Gaussian as one way of modelling frailty in streg differs yet again. Note, however, that the program geninvgauss by Roberto Gutierrez in hisgendistpackage (accessible usingfindit) that produces random deviates from an inverse Gaussian uses the same parameterisation, and the same names mu and lambda, as that here.

Saved resultsIn addition to the usual results saved after

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

e(mu)ande(lambda)are the estimated inverse Gaussian parameters.The following results are saved regardless of whether covariates have been specified:

e(b_mu)ande(b_lambda)are row vectors containing the parameter estimates from each equation.

e(length_b_mu)ande(length_b_lambda)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

. invgaussfit mpg

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

Stephen P. Jenkins, University of Essex stephenj@essex.ac.uk

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

Statistical distributions.New York: John Wiley.Hilbe, J. 2000. Two-parameter log-gamma and log-inverse Gaussian models.

Stata Technical Bulletin53: 31-32 (STB Reprints9: 273-275).Johnson, N.L., Kotz, S. and Balakrishnan, N. 1994.

Continuous univariatedistributions: Volume 1.New York: John Wiley.

Also seeOnline: help for pinvgauss (if installed), qinvgauss (if installed) invgausscf (if installed)