Stata 11 help for asroprobit postestimation

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

Title

[R] asroprobit postestimation -- Postestimation tools for asroprobit

Description

The following postestimation commands are of special interest after asroprobit:

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. The command also 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 marginal effects of a simulated probability of a set of ranked alternatives. The probability is stored in r(pr), the matrix of rankings is stored in r(ranks), and the matrix of marginal-effect statistics is stored in r(mfx).

Syntax for predict

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

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

statistic description ------------------------------------------------------------------------- Main pr probability of each ranking, by case; the default pr1 probability that each alternative is preferred 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 of each ranking. For each case, one probability is computed for the ranks in e(depvar).

pr1 calculates the probability that each alternative is preferred.

xb calculates the linear prediction for each alternative.

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(median [atlist]) calculate marginal effects at these values rank(ranklist) calculate marginal effects for the simulated probability of these ranked alternatives

Options level(#) set confidence interval level; default is level(95) nodiscrete treat indicator variables as continuous noesample do not restrict calculation of the medians to the estimation sample nowght ignore weights when calculating 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(median [[alternative:variable = #] [variable = #] [...]]) specifies the values at which the marginal effects are to be calculated. The default is to compute the marginal effects at the medians of the independent variables by using the estimation sample, at(median). You can also specify specific values for variables. Values for alternative-specific variables can be specified 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 wlsrank dataset, female and score are case-specific variables, whereas high and low are alternative-specific variables. The following would be a legal syntax for estat mfx:

. estat mfx, at(median high=0 esteem:high=1 low=0 security:low=1 female=1)

When nodiscrete is not specified, 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 median computations respect any if or in qualifiers, so you can restrict the data over which the medians are computed. You can even restrict the values to a specific case, e.g.,

. estat mfx if case==13

rank(alternative = # alternative = # [...]) specifies the ranks for the alternatives. The default is to rank the calculated latent variables. Alternatives excluded from rank() are omitted from the analysis. You must therefore specify at least two alternatives in rank(). You may have tied ranks in the rank specification. Only the order in the ranks is relevant.

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

level(#) sets the confidence level; default is level(95).

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 asroprobit command.

nowght specifies that weights be ignored when calculating the medians.

Examples

--------------------------------------------------------------------------- Setup . webuse travel

Fit alternative-specific rank-ordered probit model . asroprobit 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

Fit alternative-specific rank-ordered probit model . asroprobit choice travelcost termtime, casevars(income) case(id) alternatives(mode)

Store estimation results . estimates store unstructured

Fit second alternative-specific rank-ordered probit model . asroprobit choice travelcost termtime, casevars(income) case(id) alternatives(mode) correlation(independent)

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

Saved results

estat mfx saves the following in r():

Scalars

r(pr) scalar containing the computed probability of the ranked alternatives.

Matrices

r(ranks) column vector containing the alternative ranks. The rownames of e(ranks) identifies the alternatives.

r(mfx) matrix containing the computed marginal effects and associated statistics. Column 1 of the matrix contains the marginal effects; column 2, their standard errors; column 3, their z statistics; and columns 4 and 5, the confidence intervals. Column 6 contains the values of the independent variables used to compute the probabilities r(pr).

Also see

Manual: [R] asroprobit postestimation

Help: [R] asroprobit, [R] asmprobit


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