Questions tagged [mlogit]

Multinomial logistic regression is a classification method that generalizes logistic regression to multiclass problems.

Multinomial Logistic Regression

In statistics, multinomial logistic regression is a classification method that generalizes logistic regression to multiclass problems, i.e. with more than two possible discrete outcomes. That is, it is a model that is used to predict the probabilities of the different possible outcomes of a categorically distributed dependent variable, given a set of independent variables (which may be real-valued, binary-valued, categorical-valued, etc.).

Multinomial logistic regression is known by a variety of other names, including multiclass LR, multinomial regression, softmax regression, multinomial logit, maximum entropy (MaxEnt) classifier, conditional maximum entropy model.

Source: http://en.wikipedia.org/wiki/Multinomial_logistic_regression

289 questions
18
votes
2 answers

Multinomial logit in R: mlogit versus nnet

I want to run a multinomial logit in R and have used two libraries, nnet and mlogit, which produce different results and report different types of statistics. My questions are: What is the source of discrepency between the coefficients and standard…
splinter
  • 3,727
  • 8
  • 37
  • 82
10
votes
0 answers

How to run a multinomial logit regression with both individual and time fixed effects in R

Long story short: I need to run a multinomial logit regression with both individual and time fixed effects in R. I thought I could use the packages mlogit and survival to this purpose, but I am cannot find a way to include fixed effects. Now the…
shazz
  • 387
  • 1
  • 13
8
votes
3 answers

How to get average marginal effects (AMEs) with standard errors of a multinomial logit model?

I want to get the average marginal effects (AME) of a multinomial logit model with standard errors. For this I've tried different methods, but they haven't led to the goal so far. Best attempt My best attempt was to get the AMEs by hand using mlogit…
jay.sf
  • 60,139
  • 8
  • 53
  • 110
8
votes
1 answer

Multinomial Logit Choice Model in R with mnlogit()

I have question regarding the mnlogit package in R which I'll ask on StackOverflow as it's related to a specific language and library, however I won't be offended if someone decides to move it to Cross Validated (it was a hard choice of which…
Hack-R
  • 22,422
  • 14
  • 75
  • 131
7
votes
1 answer

Multinomial Logit model Python and Stata different results

I am trying to build multinomial logit model using python and stata. My data is as follows: ses_type prog_type read write math prog ses 0 low Diploma 39.2 40.2 46.2 0 0 1 middle general 39.2 38.2 46.2 1 …
Furqan Hashim
  • 1,304
  • 2
  • 15
  • 35
7
votes
1 answer

Huge difference in result of vglm() and multinomial() for mlogit

I am doing multinomial logistic regression model for iris data set, library(VGAM) mlog1 <- vglm(Species ~ ., data=iris, family=multinomial()) coef(mlog1) and the coefficients are: (Intercept):1 (Intercept):2 Sepal.Length:1 Sepal.Length:2 …
Rubi Lam
  • 217
  • 1
  • 3
  • 8
7
votes
2 answers

mlogit: missing value where TRUE/FALSE needed

I have data from a discrete choice experiment (DCE), looking at hiring preferences for individuals from different sectors. that I've formatted into long format. I want to model using mlogit. I have exported the data and can successfully run the…
6
votes
1 answer

mlogit.data() Error: Assigned data `ids` must be compatible with existing data

I have been working hours on that and I simply cannot find any solution to the problem. Hopefully someone here can help. I'm trying to create a personal choice matrix for some data with the following structure: # A tibble: 2,152 x 32 age choice…
Daniel Patkovic
  • 141
  • 1
  • 1
  • 5
6
votes
2 answers

multinomial logistic regression in R: multinom in nnet package result different from mlogit in mlogit package?

Both R functions, multinom (package nnet) and mlogit (package mlogit) can be used for multinomial logistic regression. But why this example returns different result of p values of coefficients? #prepare data mydata <-…
WCMC
  • 1,602
  • 3
  • 20
  • 32
6
votes
2 answers

Effects from multinomial logistic model in mlogit

I received some good help getting my data formatted properly produce a multinomial logistic model with mlogit here (Formatting data for mlogit) However, I'm trying now to analyze the effects of covariates in my model. I find the help file in…
spindoctor
  • 1,719
  • 1
  • 18
  • 42
6
votes
1 answer

Multinomial logit models and nested logit models

I am using the mlogit package in program R. I have converted my data from its original wide format to long format. Here is a sample of the converted data.frame which I refer to as 'long_perp'. All of the independent variables are individual…
marcellt
  • 501
  • 5
  • 14
6
votes
1 answer

multinomial mixed logit model mlogit r-package

I discovered the mlogit-package for multinomial logit models in search of estimating a multinomial mixed logit model. After reading the excellent vignette I discovered that I could not apply my data on any of the described examples. I now write in…
schlusie
  • 1,907
  • 2
  • 20
  • 26
5
votes
1 answer

Remove linear dependent variables while using the bife package

Some pre-programmed models automatically remove linear dependent variables in their regression output (e.g. lm()) in R. With the bife package, this does not seem to be possible. As stated in the package description in CRAN on page 5: If bife does…
John Doe
  • 212
  • 1
  • 9
  • 28
5
votes
1 answer

mlogit gives error: the two indexes don't define unique observations

My dataframe named longData looks like: ID Set Choice Apple Microsoft IBM Google Intel HewlettPackard Sony Dell Yahoo Nokia 1 1 1 0 1 0 0 0 0 0 0 0 0 0 2 1 2 0 0 1 0 …
Ankit Agrawal
  • 616
  • 9
  • 20
5
votes
0 answers

mlogit variable choice set

I'm trying to use the mlogit package in R to solve a discrete choice model with a variable choice set. I believe this work should with: library(mlogit) mydata = read.table("data.csv",sep = ",", header=TRUE) routes <- mlogit.data(mydata, shape =…
Charles
  • 51
  • 3
1
2 3
19 20