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

Setting up data.frame for mlogit - error message: Error in `row.names<-.data.frame`(`*tmp*`, value = paste(chid, alt, sep = ".")) :

I am trying to setup my data for the mlogit-package in R, but somehow I get an error message even though the exact demand with the same data worked before. My data-frame is called data.02.alt, and it looks like this: It can be described as the…
Vicy
  • 1
0
votes
1 answer

Is MNL the right model to use when the choice options vary across observations?

In a survey of 100 people, I am asking each person to choose between product A and product B. I ask each person this question 3 times, but each time I present a different set of products. Say, first time, Person 1 is asked to choose between 'Phone…
0
votes
1 answer

Mlogloss value in catboost starts negative and increases

I am running catboost classifier with catboost using settings: model = CatBoostClassifier(iterations=1000, learning_rate=0.05, depth=7, loss_function='MultiClass',calc_feature_importance=True) I have 5 classes and it starts from -ve values and…
muni
  • 1,263
  • 4
  • 22
  • 31
0
votes
1 answer

how to put constraints on parameter estimation in R?

I am fitting a logit model on R using mlogit package. All the parameters of the dummy variables (var1, var2, var3) are normally distributed. How can I put a constraint on one variable (var1) to make its parameter zero-mean? The current code returns…
JustinMS
  • 23
  • 1
  • 7
0
votes
1 answer

computationally singularity error when using characters in R mlogit- package

there are some linked questions but I really can not make any sense out of it. I am new to statistics, R, the mlogit package and also to stockoverflow. I will try to ask my question as precisely as possible. Here is [a link to the data…
Konrad
  • 1
0
votes
1 answer

How to use mnlogit with different choice set for different alternatives

I have a dataset similar to below, where I have a different choice set for different alternatives. For example for chid=1 we have alt1 to alt4, but for chid=2 we have alt5 to alt9. mode income alt price catch chid weight FALSE 7083 …
deepAgrawal
  • 673
  • 1
  • 7
  • 25
0
votes
0 answers

aggregate logit choice model in R

I have an aggregate data frame like below where I know how many customers purchased different cars given the characteristics of each car. How can I create an aggregated logit model (or nested logit model) using this data set? I know about the mlogit…
deepAgrawal
  • 673
  • 1
  • 7
  • 25
0
votes
0 answers

How to efficiently balance an unbalanced R dataframe

I'm using a statistical library mlogit which has an inefficient routine to create a balanced data.frame from an unbalanced one. With my particular dataset an intermediate data.frame mf is produced with several 100,000 rows. The problematic line of…
user2699676
  • 95
  • 1
  • 7
0
votes
1 answer

Error while estimating marginal effects

I have a problem in retrieving marginal effects for a fitted logistic regression model in Stata 15. The outcome variable mathtsbv is binary, a gender variable sex is also dummy and recorded ethnicity eth variable is categorical with values ranging…
Ruslan Seletskiy
  • 309
  • 3
  • 14
0
votes
1 answer

Error in mlogit package: system is computationally singular: reciprocal condition number = 8.87901e-37

I have a data set that is formatted according to mlogit's standards using mlogit.data command in Rstudio. Trip SevereEarthquake Night Age Mode 1.NTG 1 0 0 18 FALSE 1.TGNV 1 0 0 18…
Amir H
  • 115
  • 12
0
votes
2 answers

mlogit package in R: intercept and alternative specific individual variables

I'm trying to deal with the package mlogit in R to build up a transportation-mode choice model. I searched similar problems but I've not found anything. I have a set of 3 alternatives (walk, auto, transit) in a logit model, with alternative specific…
Gio
  • 1
  • 1
0
votes
0 answers

Does R's mlogit deal with multi-sized set of unique alternatives?

Customers are faced with series of choices of unique alternatives. For example: Customer 1 chooses between alternatives A1,A2,A3,A4; Customer 1 chooses between atlernatives B1,B2; Customer 2 chooses between alternatives C1,C2,C3; Customer 2…
8k14
  • 103
  • 2
0
votes
0 answers

Predict() with nested multinomial logit models

I'm using the mlogit package in R to create a nested multinomial logit model of healthcare provider choice given choice data I have. The data look like this: ID RES weight age wealth educ married urban partnerAge totalChildren…
TheChainsOfMarkov
  • 323
  • 1
  • 2
  • 11
0
votes
0 answers

R mlogit error : Error in .subset2(x, i, exact = exact) : no such index at level 1

I have a wide data set that I have converted into long format for estimating in mlogit. In the data I have NO alternative specific data, the values are the same for all alternatives. str(f) 'data.frame': 60 obs. of 6 variables: $ Outcome: logi …
Stephen Clark
  • 573
  • 3
  • 18
0
votes
0 answers

R - mlogit and mlogit.data - duplicate 'row.names' are not allowed

Do you have an idea why the mlogit function is yielding an error? duplicate 'row.names' are not allowed The row names are not duplicate if you ask me. This is driving me crazy. > mlORDERS <- mlogit.data(ORDERS, choice="PAYMENT_METHOD",…
wimpato
  • 11
  • 3