help lclogit postestimation -------------------------------------------------------------------------------

Title

lclogit postestimation -- Postestimation tools for lclogit

Description

lclogitpr predicts the probabilities of choice and class membership after lclogit.

lclogitcov predicts the implied covariances of choice model coefficients after lclogit.

lclogitml passes active lclogit estimates to gllamm.

Syntax

lclogitpr [type] stubname [if] [in] [, class(numlist) pr0 pr up cp ]

Description

lclogitpr predicts the probabilities of choosing each alternative in a choice situation (choice probabilities hereafter), the class shares or prior probabilities of class membership and the posterior probabilities of class membership. The predicted probabilities are stored in a set of variables named stubname# where # refers to the relevant class number; the only exception is the unconditional choice probability as it is stored in a varable named stubname.

The command assumes pr when no other option is specified.

Options for lclogitpr

class(numlist) specifies the classes for which the probabilities are going to be predicted. The default setting assumes all classes.

pr0 predicts the unconditional choice probability, which equals the average of the class-specific choice probabilities weighted by the corresponding class shares.

pr predicts the unconditional choice probability and the choice probabilities conditional on being in particular classes. This is the default option when no other option is specified.

up predicts the class shares or prior probabilities that the agent is in particular classes. They correspond to the class shares predicted by using the class memberhsip model coefficient estimates.

cp predicts the posterior probabilities that the agent is in particular classes taking into account her sequence of choices.

Syntax

lclogitcov varlist [if] [in] [, nokeep varname(stubname) covname(stubname) matrix(name) ]

Description

lclogitcov predicts the implied variances and covariances of choice model coefficients using lclogit or lclogitml estimates; see Hess et al. (2011) for details. They could be a useful tool for studying the underlying pattern of tastes.

The defaulting setting stores the predicted variances in a set of variables named var_1, var_2, ... where var_k is the predicted variance of the coefficient on the kth variable listed in varlist, and the predicted covariances in cov_12, cov_13, ..., cov23, ... where cov_kj is the predicted covariance between the coefficients on the kth variable and the jth variable in varlist.

The averages of these variance and covariances across agents (as identified by id() in lclogit) in the prediction sample are reported as a covariance matrix at the end of lclogitcov's execution.

Options for lclogitcov

nokeep drops the predicted variances and covariances from the data set at the end of the command's execution. The average covariance matrix is still displayed.

varname(stubname) requests the predicted variances to be stored as stubname1,stubname2,....

covname(stubname) requests the predicted covariances to be stored as stubname12,stubname13,....

matrix(name) stores the reported average covariance matrix in a Stata matrix called name.

Syntax

lclogitml [if] [in] [, iterate(#) level(#) nopost switch compatible_gllamm_options ]

Description

lclogitml is a wrapper for Sophia Rabe-Hesketh's gllamm (findit gllamm) which uses the ml d0 method to estimate generalised linear latent class and mixed models including the latent class conditional logit model. This post-estimation command passes active lclogit model specification and estimates to gllamm, and its primary usage mainly depends on how iterate(#) is specified; see below for details.

The default setting relabels and transforms the ereturn results of gllamm in accordance with those of lclogit, before reporting and posting them. Users can exploit lclogitpr and lclogitcov, as well as Stata's usual post-estimation commands requiring the estimated covariance matrix such as nlcom. When switch is specified, the original ereturn results of gllamm are reported and posted; users gain access to gllamm's post-estimation commands, but lose access to lclogitpr and lclogitcov.

lclogitml can also be used as its own post-estimation command, for example to pass the currently active lclogitml results to gllamm for further NR iterations.

Options for lclogitml

iterate(#) specifies the maximum number of NR iterations for gllamm's likelihood maximization process. The default is iterate(0) in which case the likelihood function and its derivatives are evaluated at the currently active estimates; this allows obtaining standard errors associated with the current estimates without boostrapping.

With a non-zero argument, this option can implement a hybrid estimation strategy similar to (1997)'s. He executes a relatively small number of EM iterations to obtain intermediate estimates, and use them as starting values for direct likelihood maximization via a quasi-Newton algorithm until convergence, because the EM algorithm tends to slow down near the local maximum. Specifying a non-zero argument for this option can also be a useful tool for checking whether lclogit has declared convergence prematurely.

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

nopost restores the currently active ereturn results at the end of the command's execution.

switch displays and posts the original gllamm estimation results, without relabeling and transforming them in accordance with the lclogit output.

compatible_gllamm_options refer to gllamm's estimation options which are compatible with the latent class logit model specification. See gllamm for more information.

Saved results

By default lclogitml saves the following in e(), in addition to the others listed for lclogit except e(seed). When nopost is specified, the currently active ereturn results are restored at the end of the command's execution. When switch is specified, lclogitml saves the same set of results in e() as gllamm.

Macros e(cmd) lclogitml e(title) Model estimated via GLLAMM

Matrices e(V) variance-covariance matrix of the estimators

Reference Bhat, C., 1997. An endogenous segmentation mode choice model with an application to intercity travel. Transportation Science 31, 34-48.

Hess, S., Ben-Akiva, M, Gopinath, D., and Walker, J. 2011. Advantages of latent class over mixture of logit models, mimeo, http://www.stephanehess.me.uk/papers/Hess_Ben-Akiva_Gopinath_Walker_M > ay_2011.pdf.

Authors

This command was written by Daniele Pacifico and Hong il Yoo. Comments and suggestions are welcome. Daniele Pacifico (daniele.pacifico@tesoro.it): Italian Department of the Treasury, Italy. Hong il Yoo (h.yoo@unsw.edu.au): School of Economics, University of New South Wales, Australia.

Also see

Online: [R] lclogit, lclogit postestimation, gllamm