Stata 15 help for fmm_postestimation

[FMM] fmm postestimation -- Postestimation tools for fmm

Postestimation commands

The following postestimation commands are of special interest after estimation with fmm:

Command Description ------------------------------------------------------------------------- estat eform display exponentiated parameters estat lcmean latent class marginal means estat lcprob latent class marginal probabilities -------------------------------------------------------------------------

The following standard postestimation commands are also available:

Command Description ------------------------------------------------------------------------- contrast contrasts and linear hypothesis tests estat ic Akaike's and Schwarz's Bayesian information criteria (AIC and BIC) estat summarize summary statistics for the estimation sample estat vce variance-covariance matrix of the estimators (VCE) estat (svy) postestimation statistics for survey data estimates cataloging estimation results * hausman Hausman's specification test lincom linear combination of parameters * lrtest likelihood-ratio test margins marginal means, predictive margins, marginal effects, and average marginal effects marginsplot graph the results from margins (profile plots, interaction plots, etc.) nlcom point estimates, standard errors, testing, and inference for nonlinear combinations of coefficients predict predictions, residuals, influence statistics, and other diagnostic measures predictnl point estimates, standard errors, testing, and inference for generalized predictions pwcompare pairwise comparisons of estimates test Wald tests of simple and composite linear hypotheses testnl Wald tests of nonlinear hypotheses ------------------------------------------------------------------------- * hausman and lrtest are not appropriate with svy estimation results.

Postestimation commands such lincom and nlcom require referencing estimated parameter values, which are accessible via _b[name]. To find out what the names are, type fmm, coeflegend.

Syntax for predict

predict [type] {stub*|newvarlist} [if] [in] [, statistic options]

statistic Description ------------------------------------------------------------------------- Main mu expected value of depvar; the default eta linear prediction of depvar density density function at depvar distribution distribution function at depvar survival survivor function at depvar classpr latent class probability classposteriorpr posterior latent class probability score first derivative of the log likelihood with respect to the parameters -------------------------------------------------------------------------

options Description ------------------------------------------------------------------------- Main marginal compute statistic marginally with respect to the latent classes pmarginal compute mu marginally with respect to the posterior latent class probabilities nooffset make calculation ignoring offset or exposure * outcome(depvar [#]) specify observed response variable (default all) class(#) specify latent class (default all) ------------------------------------------------------------------------- *outcome(depvar #) is allowed only if depvar is from mlogit, ologit, or oprobit. outcome(depvar #) may also be specified as outcome(#.depvar) or outcome(depvar ##). outcome(depvar #3) means the third outcome value. outcome(depvar #3) would mean the same as outcome(depvar4) if outcomes were 1, 3, and 4.

Menu for predict

Statistics > Postestimation

Description for predict

predict after fmm creates new variables containing predictions such as means, probabilities, linear predictions, densities, or latent class probabilities.

Options for predict

+------+ ----+ Main +-------------------------------------------------------------

mu, the default, calculates the expected value of the outcomes.

eta calculates the fitted linear prediction.

density calculates the density function. This prediction is computed using the current values of the observed variables, including the dependent variable.

distribution calculates the distribution function. This prediction is computed using the current values of the observed variables, including the dependent variable. This option is not allowed for mlogit outcomes.

survival calculates the survivor function. This prediction is computed using the current values of the observed variables, including the dependent variable. This option is allowed only for streg outcomes.

classpr calculates predicted probabilities for each latent class.

classposteriorpr calculates predicted posterior probabilities for each latent class. The posterior probabilities are a function of the latent-class predictors and the fitted outcome densities.

scores calculates the scores for each coefficient in e(b). This option requires a new variable list of length equal to the number of columns in e(b). Otherwise, use stub* to have predict generate enumerated variables with prefix stub.

marginal specifies that the prediction be computed marginally with respect to the latent classes. The marginal prediction is computed by combining the class specific predictions using the latent-class probabilities.

This option is allowed only with mu and density.

pmarginal specifies that the prediction is computed by combining the class specific expected values using the posterior latent-class probabilities.

This option is allowed only with mu.

nooffset is relevant only if option offset() or exposure() was specified at estimation time. nooffset specifies that offset() or exposure() be ignored, which produces predictions as if all subjects had equal exposure.

outcome(depvar [#]) specifies the depvar for which predictions should be calculated. Predictions for all observed response variables are computed by default. Most models have only one depvar. If depvar is an mlogit, ologit, or oprobit outcome, then # optionally specifies which outcome level to predict. The default is the first level.

class(#) specifies that predictions for latent class # be calculated. Predictions for all latent classes are computed by default.

Syntax for margins

margins [marginlist] [, options]

margins [marginlist] , predict(statistic ...) [predict(statistic ...) ...] [options]

statistic Description ------------------------------------------------------------------------- default calculate expected values for each depvar mu calculate expected value of depvar eta calculate expected value of linear prediction of depvar classpr calculate latent class prior probabilities density not allowed with margins distribution not allowed with margins survival not allowed with margins classposteriorpr not allowed with margins score not allowed with margins ------------------------------------------------------------------------- mu defaults to the first depvar if option outcome() is not specified. If depvar is mlogit, ologit, or oprobit, the default is the first level of the outcome. The default is the first latent class if class() is not specified. eta defaults to the first depvar if option outcome() is not specified. If depvar is mlogit, the default is the first level of the outcome. classpr defaults to the first latent class if option class() is not specified. predict's option marginal is assumed if predict's option class() is not specified.

Statistics not allowed with margins are functions of stochastic quantities other than e(b).

For the full syntax, see [R] margins.

Menu for margins

Statistics > Postestimation

Description for margins

margins estimates margins of response for outcome means, outcome probabilities, and latent-class probabilities.

Remarks and examples

For examples using estimates stats to compare models based on Akaike information criterion and Bayesian information criterion, see [FMM] example 1a, [FMM] example 1b, and [FMM] example 1d.

For examples using estat lcprob to obtain marginal latent class probabilities and estat lcmean to obtain marginal predicted means, see [FMM] example 2 and [FMM] example 3.

For examples using test and contrast to test equality of coefficients across classes, see [FMM] example 1c.

For examples using predict, see [FMM] example 2, [FMM] example 3, and [FMM] example 4.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index