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
0
votes
1 answer

How do I plot a predicted vs actual graph for my Logit Model

I'm new to R, and was wondering if any of you could help me out with the code to make a predicted vs actual graph. I am trying to predict the direction of stock price movements using a GLM Logit Model. Your help will be appreciated. cat("\014"); …
0
votes
1 answer

Building an error component logit using mlogit

I want to build an error component logit using R's mlogit library. I have considered my dataset as a panel dataset (i.e. each row indicates an alternative) and then build an error component logit model. While I understand that in order to build a…
0
votes
0 answers

Trying to write a function to predict shares, keep running into same error

I am trying to make a share prediction using the model that I created (called model3 and using mlogit) for the following cars: -Car 1: 4 seats, automatic transmission, convertible, 40 -Car 2: 2 seats, manual transmission, not convertible,…
0
votes
1 answer

Dropping variables from the coefplot of marginal effects (mlogit)

I want to create a coefficient plot by coefplot on the marginal effects after running a multinomial logistic regression in Stata. What I would like to get help with: I would like to keep only one variable in the graph - i.cohort which has 6…
Ripon
  • 25
  • 7
0
votes
0 answers

singularity issue in mlogit model when model contains interaction

I'm using below r command on my choice model data which is perfectly working: mlmodel_BL <- mlogit(choice ~ Price + Feature + Brloy , data = mldata_BL, reflevel = "Brand4") but when I want to add interaction there, I face singularity…
Lili.Y
  • 13
  • 3
0
votes
2 answers

Why singularity error in DCE Random Parameters model - mlogit - due to opt-out/no buy?

I'm working on a discrete choice experiment with the following characteristics: 3 alternatives which includes 1 opt-out. Each of the 2 alternatives has 3 attributes, with each attribute having 3 factor levels. Each respondent has 6 choice tasks to…
Ieben
  • 1
0
votes
0 answers

I have a shiny app that uses mlogit package but the created models dont work when i change variables

I created a shiny app which uses the mlogit package, in the shiny app, people can create there own models with different variables/ attributes But when i change the attributes in the shiny app, the app crashes This is the code: The ui Part …
0
votes
1 answer

Does mlogit require a specific kind of row name?

I have data which looks like this: ## # A tibble: 6 x 7 ## sampleno h0 h1 h2 h3 h4 correct_hyp_no ## ## 1 0 7498 7147 7137 7003 7003 0 ## 2 1 7349 7133 7104 7065 6960 0 ## 3 2 6907 …
Mohan
  • 7,302
  • 5
  • 32
  • 55
0
votes
1 answer

Handling alternative-specific NA values in mlogit

It is common in mode choice models to have variables that vary with alternatives ("generic variables") but that are undefined for certain modes. For example, transit fare is present for bus and light rail, but undefined for automobiles and biking.…
gregmacfarlane
  • 2,121
  • 3
  • 24
  • 53
0
votes
0 answers

How to fix mlogit Error: "system is computationally singular: reciprocal condition number"

When I try to fit an Ordered Logit model to a long dataset the functions return an error Error in solve.default(H, g[!fixed]): system is computationally singular: reciprocal condition number = 3.64628e-18. I've seen this but the data is not…
0
votes
1 answer

Is it possible to introduce an interaction term between an alternative specific and an individual specific variable to a mlogit modell

I'm trying to predict the options of a choice experiment using the r funciton mlogit. I have alternative specific variables and individual specific variables. Now I'd like to introduce an interaction term between one of the alternative specific…
dropout
  • 17
  • 5
0
votes
1 answer

Non linear utility functions for discrete choice models? Can mlogit in r do it?

in my research I have been for a while estimating simple models in mlogit with binary choices and linear utility functions in R. Right now I am trying to replicate a destination choice model that uses non linear utility functions. In my example I…
0
votes
1 answer

Is it possible to run a logit model with only ones and no zeros?

For my thesis I'm trying to build a model which predicts the ones of my sample correctly via a logit model. First, I encountered the problem that python does not have a logit model, but only a logistic model. But with this logistic model I get an…
0
votes
1 answer

nested logit: must all nests contain at least 2 items?

I'm estimating a model about how people travel. There are 4 alternatives: air, car, bus, and train. I want to create a nested logit model in which travelers first choose whether or not to fly, then, if they don't fly, choose between the remaining…
Zhaochen He
  • 610
  • 4
  • 12
0
votes
0 answers

Re-edited: problem in shaping unbalance panel data to run mixed multinomial regression

I have followed 'mlogit' paper to prepare my unbalance panel data for multinomial (panel) regresssion, but I failed to run the regression. After reading some posts, I beleive I have found a good structure for the data, which is similar to this one.…