help fmm                                          also see:  fmm postestimation

-------------------------------------------------------------------------------

Title

fmm -- Finite mixture models

Syntax

Finite mixture models

fmm depvar [indepvars] [if] [in] [weight], components(#) mixtureof(density) [fmm_options]

fmm_options Description ------------------------------------------------------------------------- Model components(#) specifies the number of mixture components. It is required. mixtureof(density) specifies the component density. It is required.

Model 2 probability(varlist) specifies the variables used to model the component probabilities. df(#) specifies the degrees of freedom of the Student-t density. The default is 5. noconstant suppress constant term exposure(varname) include ln(varname) in model with coefficient constrained to 1. offset(varname) include varname in model with coefficient constrained to 1. constraint(constraint) apply specified linear constraints.

SE/Robust vce(vcetype) vcetype may be oim, robust, opg, bootstrap, or jackknife robust synonym for vce(robust) cluster(varname) adjust standard errors for intragroup correlation

Max options maximize_options control the maximization process; some options may be useful ------------------------------------------------------------------------- depvar, indepvars, varname_e, and varname_o may contain time-series operators; see tsvarlist.

fweights, pweights, iweights, and aweights are allowed; see weight. See postestimation commands for features available after estimation.

density Description ------------------------------------------------------------------------- gamma Gamma lognormal Lognormal negbin1 Negative Binomial-1 (constant dispersion) negbin2 Negative Binomial-2 (mean dispersion) normal Normal or Gaussian poisson Poisson studentt Student-t with df degrees of freedom -------------------------------------------------------------------------

Description

fmm fits a finite mixture regression model of depvar on indepvars using maximum likelihood estimation. The model is a J-component finite mixture of densities, with the density within a component (j) allowed to vary in location and scale. Optionally, the mixing probabilities may be specified with covariates.

Options for fmm

+-------+ ----+ Model +------------------------------------------------------------

components(#) specifies the number of mixing components. It is an integral part of specifying the finite mixture model and is not optional. # should be an integer between 2 and 9.

mixtureof(density) specifies the component density in the mixture model. It is not optional. For more on the available choices of component densities and associated specifications of conditional means, see Remarks below.

+---------+ ----+ Model 2 +----------------------------------------------------------

probability(varlist) specifies the variables used to model the component probabilities. The probabilities are specified using a multinomial logit parameterization.

df(#) specifies the degrees of freedom if a Student-t component density is specified. The default value is 5.

noconstant, exposure(varname), offset(varname), constraints(constraints); see estimation options.

+-----------+ ----+ SE/Robust +--------------------------------------------------------

vce(vcetype); see vce_option.

robust, cluster(varname); see estimation options. cluster() can be used with pweights to produce estimates for unstratified cluster-sampled data.

+-----------+ ----+ Reporting +--------------------------------------------------------

level(#); see estimation options.

+-------------+ ----+ Max options +------------------------------------------------------

maximize_options: difficult, technique(algorithm_spec), iterate(#), [no]log, trace, gradient, showstep, hessian, shownrtolerance, tolerance(#), ltolerance(#), gtolerance(#), nrtolerance(#), nonrtolerance, from(init_specs); see maximize are standard ml options.

shift(#) generates alternative starting values by systematically shifting some values from the default algorithm by the proportion #.

search(spec) spec may be on or off and specifies whether ml's initial search algorithm is used. The default is off.

Because finite mixture models have complicated likelihood functions, shift(#), search(spec), difficult and from(init_specs) may be useful choices if the default setup fails. The other options are seldom used.

Remarks

If components(2) is specified, default starting values are specified using the parameters from the associate degenerate mixture model. In order to take advantage of the built-in algorithms for specifying starting values for models with {it #} components, ({it #}>2), the user must estimate models sequentially {it #}=2. This is the preferred estimation approach. But fmm will not check for reasonableness of the prior fmm estimates, so proceed carefully. Otherwise, fmm expects the user to specify starting values using the from(init_specs) option.

The available component densities and the associated conditional means are

Density fmm option cond. mean ---------------------------------------------------------------------- Gamma density(gamma) alpha_j exp(xb_j) Lognormal density(lognormal) exp(xb_j + 0.5 sigma_j^2) Negative Binomial-1 density(negbin1) exp(xb_j) Negative Binomial-2 density(negbin2) exp(xb_j) Normal(Gaussian) density(normal) xb_j Poisson density(poisson) exp(xb_j) Student-t density(studentt) xb_j

Note that fmm has not been updated to accommodate factor variables.

Saved results

In addition to standard results saved by maximum likelihood procedures in e(), fmm saves the following scalars:

e(parname_est) parameter estimate e(parname_se) standard error of estimate

where parname denotes either a scale parameter or a mixing probability parameter.

Examples

Mixture of normals

. webuse womenwk, clear

. fmm wagefull educ age married, mix(normal) comp(2)

Mixture of Negative Binomials (Type 2)

. webuse medpar, clear

. gen los0 = los - 1

. fmm exlos died hmo type2-type3, mix(negbin2) comp(2) comp(2)

References

Conway, K. and P. Deb, (2005), Is Prenatal Care Really Ineffective? Or, is the 'Devil' in the Distribution?, Journal of Health Economics, 24, 489-513.

Deb, P. and P. K. Trivedi (1997), Demand for Medical Care by the Elderly: A Finite Mixture Approach, Journal of Applied Econometrics, 12, 313-326.

McLachlan, G.J., and D. Peel (2000), Finite Mixture Models, New York: John Wiley.

Titterington, D.M., A.F.M. Smith and U.E. Makow (1985), Statistical Analysis of Finite Mixture Distributions, New York: John Wiley, 1985.

Author

Partha Deb, Hunter College and the Graduate Center, City University of New York, USA partha.deb@hunter.cuny.edu

Also see

Online: fmm postestimation