## S3 method for class 'formula':
estimate.mlogit(f, data, method = "BHHH",
choices = NULL, base.choice = 1,
varying = NULL, sep = ".", ...)
## S3 method for class 'mnl.spec':
estimate.mlogit(object, data, method='BHHH', ...)## S3 method for class 'bic.mlogit':
estimate.mlogit(object, ...)
## S3 method for class 'list':
estimate.mlogit(object, data, verbose=TRUE, ...)
mnl.spec.mnl.spec containing the model specification, or an object of class bic.mlogit, or a list of objects of class maxLik function of the data is reduced to containchoices.data that are alternative-specific.data and method can be also passed to estimate.mlogit.bic.mlogit and estimate.mlogit.list.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:mnl.spec object.maxLik function.code.code=3 (see maxLik).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.
summary.mnl, mnl.spec, reshape, maxLikdata(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