Maximum likelihood estimation of coefficients of one or more multinomial logit models.
# S3 method for formula
estimate.mlogit (f, data, method = "BHHH",
choices = NULL, base.choice = 1,
varying = NULL, sep = ".", ...)
# S3 method for mnl.spec
estimate.mlogit (object, data, method='BHHH', ...)# S3 method for bic.mlogit
estimate.mlogit (object, ...)
# S3 method for list
estimate.mlogit (object, data, verbose=TRUE, ...)
Functions estimate.mlogit.formula and estimate.mlogit.mnl.spec return an object of class mnl. Functions estimate.mlogit.bic.mlogit and estimate.mlogit.list return a list of such objects with each element corresponding to one specification. An object of class mnl contains the following components:
The estimated coefficients.
Maximum log-likelihood.
Null log-likelihood.
Akaike Information Criterium.
Bayesian Information Criterium.
Number of iterations.
The Hessian at the maximum.
The last gradient value.
The MNL probabilities computed with the estimated parameters.
Difference between observed values and fitted values.
The corresponding mnl.spec object.
Convergence statistics.
Estimation method.
Time needed for the estimation.
Code returned by the maxLik function.
Message describing the code.
List describing the last unsuccessful step if code=3 (see maxLik).
Formula as described in Details of mnl.spec.
An object of class mnl.spec containing the model specification, or an object of class bic.mlogit, or a list of objects of class mnl.spec.
Data frame containing the variables of the model.
Estimation method passed to the maxLik function of the maxLik package. Available methods are “Newton-Raphson”, “BFGS”, “BHHH”, “SANN” or “NM”.
Vector of names of alternatives. If it is not given, it is determined from the response column of the data frame. Values of this vector should match or be a subset of those in the response column. If it is a subset, data is reduced to contain only observations whose choice is contained in choices.
Index of the base alternative within the vector choices.
Indices of variables within data that are alternative-specific.
Separator of variable name and alternative name in the ‘varying’ variables.
Logical switching log messages on and off.
Arguments passed to the underlying optimization routine in optim. Note that arguments data and method can be also passed to estimate.mlogit.bic.mlogit and estimate.mlogit.list.
Hana Sevcikova
The data are expected to be in the ‘wide’ format (using the terminology of the reshape function). There should be one record for each individual. Alternative-specific variables occupy single column per alternative.
The given optimization routine is called for the multinomial data, starting from the coefficients being all zeros.
Function estimate.mlogit.bic.mlogit invokes as many estimations as there are models selected in the bic.mlogit object. Function estimate.mlogit.list invokes an estimation for each specification included in the object argument.
Train, K.E. (2003) Discrete Choice Methods with Simulation. Cambridge University Press.
summary.mnl, mnl.spec, reshape, maxLik
data(heating)
est <- estimate.mlogit(depvar ~ ic + oc, heating, choices=1:5,
varying=c(3:12, 20:24), sep='')
summary(est)
Run the code above in your browser using DataLab