Stata 11 help for asmprobit_postestimation

help asmprobit postestimation dialogs: predict estat also see: asmprobit -------------------------------------------------------------------------------

Title

[R] asmprobit postestimation -- Postestimation tools for asmprobit

Description

The following postestimation commands are of special interest after asmprobit:

command description ------------------------------------------------------------------------- estat alternatives alternative summary statistics estat covariance variance-covariance matrix of the alternatives estat correlation correlation matrix of the alternatives estat facweights covariance factor weights matrix estat mfx marginal effects -------------------------------------------------------------------------

The following standard postestimation commands are also available:

command description ------------------------------------------------------------------------- estat AIC, BIC, VCE, and estimation sample summary estimates cataloging estimation results lincom point estimates, standard errors, testing, and inference for linear combinations of coefficients lrtest likelihood-ratio test nlcom point estimates, standard errors, testing, and inference for nonlinear combinations of coefficients predict predicted probabilities, estimated linear predictor and its standard error predictnl point estimates, standard errors, testing, and inference for generalized predictions test Wald tests of simple and composite linear hypotheses testnl Wald tests of nonlinear hypotheses -------------------------------------------------------------------------

Special-interest postestimation commands

estat alternatives displays summary statistics about the alternatives in the estimation sample and provides a mapping between the index numbers that label the covariance parameters of the model and their associated values and labels for the alternative variable.

estat covariance computes the estimated variance-covariance matrix for the alternatives. The estimates are displayed, and the variance-covariance matrix is stored in r(cov).

estat correlation computes the estimated correlation matrix for the alternatives. The estimates are displayed, and the correlation matrix is stored in r(cor).

estat facweights displays the covariance factor weights matrix and stores it in r(C).

estat mfx computes the simulated probability marginal effects.

Syntax for predict

predict [type] newvar [if] [in] [, statistic altwise]

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

statistic description ------------------------------------------------------------------------- Main pr probability alternative is chosen; the default xb linear prediction stdp standard error of the linear prediction ------------------------------------------------------------------------- These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only for the estimation sample.

Menu

Statistics > Postestimation > Predictions, residuals, etc.

Options for predict

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

pr, the default, calculates the probability that alternative j is chosen in case i.

xb calculates the linear prediction for alternative j and case i.

stdp calculates the standard error of the linear predictor.

altwise specifies that alternative-wise deletion be used when marking out observations due to missing values in your variables. The default is to use casewise deletion. The xb and stdp options always use alternative-wise deletion.

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 the stub* option to have predict generate enumerated variables with prefix stub.

Syntax for estat alternatives

estat alternatives

Menu

Statistics > Postestimation > Reports and statistics

Syntax for estat covariance

estat covariance [, format(string) border(string) left(#)]

Menu

Statistics > Postestimation > Reports and statistics

Options for estat covariance

format(string) sets the matrix display format. The default is format(%9.0g).

border(string) sets the matrix display border style. The default is border(all). See [P] matlist.

left(#) sets the matrix display left indent. The default is left(2). See [P] matlist.

Syntax for estat correlation

estat correlation [, format(string) border(string) left(#)]

Menu

Statistics > Postestimation > Reports and statistics

Options for estat correlation

format(string) sets the matrix display format. The default is format(%9.4f).

border(string) sets the matrix display border style. The default is border(all). See [P] matlist.

left(#) sets the matrix display left indent. The default is left(2). See [P] matlist.

Syntax for estat facweights

estat facweights [, format(string) border(string) left(#)]

Menu

Statistics > Postestimation > Reports and statistics

Options for estat facweights

format(string) sets the matrix display format. The default is format(%9.0f).

border(string) sets the matrix display border style. The default is border(all). See [P] matlist.

left(#) sets the matrix display left indent. The default is left(2). See [P] matlist.

Syntax for estat mfx

estat mfx [if] [in] [, options]

options description ------------------------------------------------------------------------- Main

varlist(varlist) display marginal effects for varlist at(mean [atlist]|median [atlist]) calculate marginal effects at these values

Options level(#) set confidence interval level; default is level(95) nodiscrete treat indicator variables as continuous noesample do not restrict calculation of means and medians to the estimation sample nowght ignore weights when calculating means and medians -------------------------------------------------------------------------

Menu

Statistics > Postestimation > Reports and statistics

Options for estat mfx

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

varlist(varlist) specifies the variables for which to display marginal effects. The default is all variables.

at(mean [atlist]|median [atlist]) specifies the values at which the marginal effects are to be calculated. atlist is

[[alternative:variable = #] [variable = #] [...]]

The default is to calculate the marginal effects at the means of the independent variables at the estimation sample, at(mean).

After specifying the summary statistic, you can specify a series of specific values for variables. You can specify values for alternative-specific variables by alternative, or you can specify one value for all alternatives. You can specify only one value for case-specific variables. For example, in the travel dataset, income is a case-specific variable, whereas termtime and travelcost are alternative-specific variables. The following would be a legal syntax for estat mfx:

. estat mfx, at(mean air:termtime=50 travelcost=100 income=60)

When nodiscrete is not specified, at(mean [atlist]) or at(median [atlist]) has no effect on computing marginal effects for indicator variables, which are calculated as the discrete change in the simulated probability as the indicator variable changes from 0 to 1.

The mean and median computations respect any if or in qualifiers, so you can restrict the data over which the means or medians are computed. You can even restrict the values to a specific case; e.g.,

. estat mfx if case==21

+---------+ ----+ Options +----------------------------------------------------------

level(#) specified the confidence level, as a percentage, for confidence interval. The default is level(95) or as set by set level.

nodiscrete specifies that indicator variables be treated as continuous variables. An indicator variable is one that takes on the value 0 or 1 in the estimation sample. By default, the discrete change in the simulated probability is computed as the indicator variable changes from 0 to 1.

noesample specifies that the whole dataset be considered instead of only those marked in the e(sample) defined by the asmprobit command.

nowght specifies that weights be ignored when calculating the means or medians.

Examples

--------------------------------------------------------------------------- Setup . webuse travel . asmprobit choice travelcost termtime, casevars(income) case(id) alternatives(mode)

Obtain correlation matrix of the alternatives . estat correlation

Obtain variance-covariance matrix of the alternatives . estat covariance

Calculate probability alternative is chosen . predict p

Calculate marginal effects for the case-specific variable income and the alternative-specific variables termtime and travelcost . estat mfx, at(air: termtime=50 travelcost=100 income=60)

--------------------------------------------------------------------------- Setup . webuse travel, clear . asmprobit choice travelcost termtime, casevars(income) case(id) alternatives(mode) . estimates store full . asmprobit choice travelcost termtime, casevars(income) case(id) alternatives(mode) correlation(exchangeable)

Perform likelihood-ratio test to compare models . lrtest full . ---------------------------------------------------------------------------

Saved results

estat mfx saves the following in r():

Scalars

r(pr_alt) scalars containing the computed probability of each alternative evaluated at the value that is labeled X in the table output. Here alt are the labels in the macro e(alteqs).

Matrices

r(alt) matrices containing the computed marginal effects and associated statistics. There is one matrix for each alternative, where alt are the labels in the macro e(alteqs). Column 1 of each matrix contains the marginal effects; column 2, their standard errors; columns 3 and 4, their z statistics and the p-values for the z statistics; and columns 5 and 6, the confidence intervals. Column 7 contains the values of the independent variables used to compute the probabilities r(pr_alt).

Also see

Manual: [R] asmprobit postestimation

Help: [R] asmprobit


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