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

mlogit() outputs NA's for nested logit model in R

I am trying to estimate a nested logit model of company siting choices, with nests = countries and alternatives = provinces, based on a number of alternative-specific characteristics as well as some company-specific characteristics. I formatted my…
0
votes
2 answers

Multinomial logit model in R on grouped data, data conversion and mlogit set-up

I want to estimate the parameters of a multinomial logit model in R and wondered how to correctly structure my data. I’m using the “mlogit” package. The purpose is to model people's choice of transportation mode. However, the dataset is a time…
0
votes
1 answer

How can I pass a weight decay argument to mlogit()?

How can I specify weight decay in a model fit by the mlogit? The multinom() function of nnet allows you to specify weight decay for the model that is being fit, and mlogit uses this function behind the scenes to fit its models so I imagine that it…
Johan Larsson
  • 3,496
  • 18
  • 34
0
votes
0 answers

"Error in if (abs(x - oldx) < ftol)" when using "lognormal" distribution in mixed logit

I have a question about how to use the mlogit package in R to do analysis of discrete choice survey data. Our survey is about asking people to choose from different insurance policies(with two attributes of deductible and premium). The code I used…
Dera
  • 1
  • 3
0
votes
0 answers

How to use mlogit in r to estimate a binary Probit model

For binary choice, I know I can use glm to estimate a binary Probit model. However, for teaching purpose, since I am going to move on to multinomial choice at a later stage (with more than two alternatives), I try to use mlogit package all the way…
0
votes
1 answer

Mlogit for Rank-Ordered Logit - Troubleshooting

I am trying to use the mlogit package to run a rank-ordered logit on my data. I had participants choose their top three out of 24 choices, and then rank them in order of preference. When I try to prepare the data for analysis using the mlogit.data…
letitburn
  • 11
  • 4
0
votes
1 answer

mnlogit error when calling predict with newdata

I'd like to fit a model using the mnlogit package and use it to make out-of-sample predictions. I've set up a toy example using the fishing data that comes with mnlogit: library(data.table) library(mnlogit) data(Fish, package="mnlogit") fish_dt <-…
Adrian
  • 3,138
  • 2
  • 28
  • 39
0
votes
0 answers

mlogit error "non-numeric argument to binary operator"

I ran this statement: clogitdf <- mlogit.data(df1, choice= "y", shape="long", alt.var="alt", chid="chid") And here's a dput of the first 48 lines of the dataset (replaced with dput of df1): http://pastebin.com/RNJBRhGr I get an error saying…
Mako212
  • 6,787
  • 1
  • 18
  • 37
0
votes
0 answers

R: mlogit returning incorrect coefficients

Edit: The subset of the dataframe I provided way giving a different error, so I've replaced the pastebin entry with the full data frame. Here's the top of the data frame, then read into mlogit format by clogitdf <- mlogit.data(df1, choice= "y",…
Mako212
  • 6,787
  • 1
  • 18
  • 37
0
votes
1 answer

mlogit duplicate 'row.names' are not allowed

New to R and want to use mlogit function. However after putting my data into a data frame and run x <- mlogit.data(mlogit, choice="PlacedN", shape="long", alt.var="RaceID") I get duplicate 'row.names' are not allowed I can upload my file if…
Michael
  • 13
  • 1
  • 4
0
votes
1 answer

How to use a list of characters in mlogit function as the list of independent variables

I am estimating a multinomial logit using mlogit in r. Is there a way to use a list of variables in the mlogit function, instead of enumerating all the variables in it? Here is a reproducible example. My question is how can I avoid typing AGE +…
Milad
  • 339
  • 2
  • 12
0
votes
1 answer

Calculating marginal effects using mlogit in R

I have asked this question on Cross Validated, but think I might not get help as this is more of a programming question rather then theory/interpretation of the statistics. I am trying to use the mlogit package in R and have been following the…
Kerry
  • 793
  • 14
  • 33
0
votes
1 answer

Constraining all coefficients to be equal, mlogit, Stata

I have a multinomial logit model that I want to estimate with mlogit. I want to constraint the coefficients on one of the independent variables (but not the rest) to be equal across all alternatives. I have tried the following constraints, but…
0
votes
1 answer

Using mlogit in R dependant and independent categorical variables

I have two vectors (A and B) with categorical data of 36 subjects. A_i,j being the categorytype1 j, subject i fits into and B_i,k is categorytype2 k of subject i. With i=1:36, j=1:5 and k=1:6. library(mlogit) AB <-…
0
votes
0 answers

Lapack routine dgesv mlogit mlogit in R

I am getting an error in R when I try to run mlogit. I try to estimate the following: logit3 <- mlogit(choice~1|prod1+prod2+camp1+camp2+salm1+salm2+orig1+orig2+price1+price2, data=CNLdata) and the error appeared is the following: logit3 <- …
Yannis
  • 3
  • 3
1 2 3
19
20