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

Nested logit model using panel data in R

I am new to R and I would love it if you can help me with this because I am having serious difficulties. I have unbalanced panel data that shows monthly companies' performance compared to the rest of the market in terms of $$ (eg. this month company…
Simon_W
  • 57
  • 4
0
votes
1 answer

Error in s + x[[i]] : non-conformable arrays in R - gmnl package for Latent Class Analysis

I am running a latent class analysis for choice modeling by using gmnl package. After getting my data in the right format (mlogit.data), I met the error "Error in s + x[[i]] : non-conformable arrays" when running the gmnl model. The code of running…
Yaxin Cui
  • 17
  • 4
0
votes
1 answer

mlogit : using varying alternatives for mlogit in R

I am trying to use varying alternatives for each person. However not able to get it working. If I make the alternatives same for each person, it works fine. How to make it varying and work. Data : > dput( df1 ) structure(list(Choice = c(1L, 0L, 0L,…
Soumya Boral
  • 1,191
  • 14
  • 28
0
votes
0 answers

system is computationally singular : mlogit

When I am trying to add all variables in formula, I am getting this error. If I omit A then, the model runs fine. dput(df1) structure(list(ID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,…
Soumya Boral
  • 1,191
  • 14
  • 28
0
votes
1 answer

Wrong formula specification in mformula/mlogit? Error in str2lang(x) : :2:0: unexpected end of input

I'm trying to use the mlogit package in R in order to make a choice model on a panel dataset. For this, I have successfully specified the data in mlogit.data form. The y variable consists of TRUE / FALSE indicating the choice, the service variable…
0
votes
1 answer

Multinomial Logit Fixed Effects: Stata and R

I am trying to run a multinomial logit with year fixed effects in mlogit in Stata (panel data: year-country), but I do not get standard errors for some of the models. When I run the same model using multinom in R I get both coefficients and standard…
Emily
  • 1
  • 3
0
votes
0 answers

Multilevel Logit Model in R - not including all the values for random intercept

I am building a random intercept model in R using the glmer function, with the 2nd level variable being country. When I run my model however, it is only including 24 countries and 27005 observations when there are 60 countries and 75047…
Rachel9866
  • 121
  • 1
  • 11
0
votes
1 answer

Errors 'undefined columns selected' and 'no individual index'

I am working with a conjoint dataset and estimating multinomial logit models. To work with the mlogit package I had to convert the data, which I did like this: dat <- mlogit.data(dat, choice="Selection_dummy", shape="long", alt.var="Alt_id", id =…
Niels
  • 1
0
votes
0 answers

Error in solve.default(H, g[!fixed]) : system is computationally singular: reciprocal condition number = 7.50953e-17

I am trying to run a mlogit in R using a travel diary of ridehailing trips. The dependent variable is solo vs. pool (e.g., UberX vs. UberPOOL) (See screenshot of the data after applying mlogit.data. Each person (id) did different numbers of trips.…
0
votes
1 answer

Problems with the estimation time of mixed logit models in R

I would like to estimate a mixed logit model for a group of 80,000 individuals and 1,200 alternatives in R. Packages like gmnl and mlogit take a significant time to estimate the model, even without including random parameters. The mnlogit package…
0
votes
0 answers

Issue with 'varying arguments not being the same length when converting data format - cannot detect cause of issue

I am looking to run a multinomial logit model on discrete choice survey data. Prior to doing this I want to have data in wide format in my csv doc in excel and convert to long format in R using the following code; dummychoicedataset2 <-…
chris1
  • 11
  • 3
0
votes
1 answer

How to add interaction terms in multinomial regression

I am using the mlogit function from the mlogit package to run a multinomial logit regression. I am not sure how to add interaction terms into my model. Here is a toy dataset and my attempt to add interactions: library(mlogit) data <-…
cliu
  • 933
  • 6
  • 13
0
votes
1 answer

Receiving error: "Unknown random parameter" , when defining rpar in mlogit() [Random parameter logit model]

I want to estimate a multinomial logit model(mixed logit) with heteroskedastic customer "brand preferences" (random parameter logit model) using mlogit() function. The dataset is the saltine Cracker dataset and users can choose among 4 brands.…
0
votes
1 answer

mlogit and clusterSEs - error in dataframe

I have a dataset with multiple observations per customer and want to do a multinominal regression in R. To account for the multiple observations per customer, I need to check for clustered standard errors. To do this I use the mlogit and clusterSEs…
Marie
  • 1
0
votes
1 answer

Error in mlogit package R missing value where TRUE/FALSE needed

as I stated in another question I'm trying to fit a mixed logit model in R. This is my dataset, where MediosUsados is the choice and Persona is the individual id: Persona ZonaOrigen ZonaDestino Proposito MediosUsados ModoPriPub ModoMotor…
yieniggu
  • 384
  • 1
  • 7
  • 20