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
1
vote
0 answers

R: na.action=na.exclude not working with mlogit

I am trying to add the fitted values of my multinomial logistic regression to the original data frame (called "ORDERS"). Unfortunately this is not possible, as apparently the predicted probabilities and the data frame don't have the same length -…
wimpato
  • 11
  • 3
1
vote
0 answers

Error in multinomial logit model in R with class factor predictor

I am running multinomial logit model using mlogit in R. My example data frame is shown below. est best_adap ele area exp 1 A planting_date up 169 15 2 B crop_varieties up 441 18 3 C shade low 461 28 4 D…
sriya
  • 179
  • 1
  • 2
  • 7
1
vote
1 answer

Why doesn't Stata and R produce the same output for a Multinomial Logit model?

Let's say I want to do a simple multinomial logit model using an online dataset in R: library(nnet) data <- data.table(read.dta('http://data.princeton.edu/wws509/datasets/irished.dta')) ml <- multinom(educg ~ gender + prestigeg + reasong,…
Parseltongue
  • 11,157
  • 30
  • 95
  • 160
1
vote
0 answers

Fixing a coefficient on variable in MNL

I have an MNL model with two alternatives with utility equations as follows: U(1) = Beta*Toll1 + Gamma*Length1 U(2) = Beta*Toll2 + Gamma*Length2 I am trying to estimate the model using R MLOGIT package. I already know that the coefficient on toll…
Gaurav
  • 193
  • 1
  • 1
  • 12
1
vote
1 answer

Modelling generic variables in a Latent class model with gmnl()

I have the problem in fomulating a model, where at least one variable is to be estimated independently from the classes, so one and the same coefficient for all classes. How could one do this? I am working with the R package…
maxatSOflow
  • 269
  • 3
  • 10
1
vote
2 answers

OxMetrics - Conditional logit model

I am trying to develop a OxMetrics code for a multinomial (or conditional) logit model (as described in http://data.princeton.edu/wws509/notes/c6s2.html). I am new to OxMetrics and still struggle to understand how the optimisation routine (MaxBFGS)…
Umka
  • 45
  • 6
1
vote
1 answer

mlogit in Stata and R

I have one question concerning the mlogit command in Stata and/or R. In the model I’m working on the individuals don’t face the same choice set each other; for example I have 10 alternatives but for some customers the choice set is reduced to 8. Is…
Andrea
  • 175
  • 6
1
vote
1 answer

Predicted probabilities from multinomial models in R

My main question is: what probabilities are given from the predict() function of mnlogit(), and how does it differ from those of the packages nnet and mlogitand ? Some background, I try to model outcome from only individual specific variables, as I…
ego_
  • 1,409
  • 6
  • 21
  • 31
1
vote
0 answers

Can you use glmulti with mlogit?

I am trying to determine a best-fitting model for a discrete-choice experiment. I'm using the mlogit package (Croissant, 2011). Each alternative has two alternative-specific characteristics (let's call them V1 and V2), and each individual has a…
TheChainsOfMarkov
  • 323
  • 1
  • 2
  • 11
1
vote
1 answer

Including opt-out as alternative specific constant in R Mlogit

I am doing a discrete choice experiment on preferences for attributes of a hypothetical drug treating weight loss in my master thesis, and I need a little help. My design is generic, and has 12 choice sets with three alternatives: Product A,…
Hbrandi
  • 171
  • 2
  • 14
1
vote
0 answers

Estimation using mlogit in R

I have a paper where the author proposes a D-optimal design for Nested Multinomial Logit Model with No-Choice. The design is as follows: CS 1: Alt A: 1 2 2 1 2 2 Alt B: 2 2 1 2 1 2 Alt C: 0 0 0 0 0 0 CS 2: Alt 1: 2 1 1 …
1
vote
0 answers

Prediction and Marginal Effects failure using mlogit() in R for a Nested Logit Model with updated data frame

I have run a Nested Logit model in R using the mlogit() package. I am now trying to measure marginal effects/elasticities and continue to run into an error. Here I have recreated the error by modifying the vignette by the package…
royburst
  • 73
  • 1
  • 5
1
vote
3 answers

McFadden R^2 and Likelihood Ratio Test not shown in mLogit in R

My problem is rather straightforward to understand but I was not able to find a solution. I am using the following code in R using the mLogit library: library("mlogit") dat = read.csv("ExpeData.csv", header = TRUE) ExpData<-…
Manos C
  • 333
  • 4
  • 16
1
vote
0 answers

R, Convert Dataset to mlogit(/mnlogit) long-format

I would like to use the R mlogit package. The documentation (http://cran.r-project.org/web/packages/mlogit/vignettes/mlogit.pdf) is well written, but I still have a question. Suppose I have a dataset composed of three categorical variables: mode,…
Pippo
  • 1,543
  • 3
  • 21
  • 40
1
vote
1 answer

Calling mlogit() from inside another function, scoping problem with variables when using attach

I need to call the mlogit() R function from inside another function. This is a function for demonstrative purposes: #------------------------- # DEMO FUNCTION #------------------------- # f = formula (string) # fData = data.frame # cVar = choice…
danfreak
  • 405
  • 1
  • 8
  • 16