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

Calculating multinomial logit model prediction probabilities

Please try to give parameterize solution (there are more than three alternatives). I have a dict with beta values: {'B_X1': 2.0, 'B_X2': -3.0} And this data frame: X1_123 X1_456 X1_789 X2_123 X2_456 X2_789 6.75 4.69 9.59 5.52 …
qwerty
  • 889
  • 6
  • 16
2
votes
1 answer

R multiple logistic regression (mlogit package)

I try to estimate multinomial logistic regression by using mlogit package, but I got the error. I have 205109 observations and below I attempted the code and error. > Data <- read.csv("NWEScsv.csv",header=T) > colnames(Data) [1] "NWSE" "W.S" …
SEIKA UTA
  • 21
  • 3
2
votes
1 answer

mlogit "row names supplied are of the wrong length", R

I am implementing a multinomial logit model using the mlogit package in R. The data includes three different "choices" and three variables (A, B, C) which contains information for the independent variable. I have transformed the data into a wide…
carsentdum
  • 57
  • 6
2
votes
1 answer

How to get marginal effects for categorical variables in mlogit?

I want to compute marginal effects for a "mlogit" object where explanatory variables is categorical (factors). While with numerical data effects() throws something, with categorical data it won't. For simplicity I show a bivariate example…
jay.sf
  • 60,139
  • 8
  • 53
  • 110
2
votes
0 answers

Differences between R and Stata in handling unidentified categorical variables

I am attempting to use the mlogit package in R to model a student's college major choice at graduation, conditional on in-major GPA, log family income, and first chosen major. First chosen major is a factor variable with all of the possible choices…
Avery
  • 21
  • 3
2
votes
1 answer

r - mlogit Error in if (abs(x - oldx) < ftol) { : missing value where TRUE/FALSE needed

Hi I am trying to use the mlogit function to estimate a discrete choice model for work trip mode of transit choice. here is what my data looks like after using the mlogit.data function mledata <- mlogit.data(data, choice="choice",shape="long",…
Sam Tucker
  • 21
  • 1
2
votes
1 answer

Difference between "margins, predict" and "margins, predict at means"

After I run a multinomial logistic regression, I am interested in obtaining predicted probabilities. I found a difference in my estimates if I run: mlogit cluster_lag i.indipvar1 i.indipvar2 i.indipvar3 indipvar4, rrr vce(cluster…
ggg
  • 73
  • 1
  • 7
2
votes
7 answers

R mlogit() function: Error in if (abs(x - oldx) < ftol) { : missing value where TRUE/FALSE needed

I am having trouble with mlogit() function. I am trying to predict which variables in a given set are the most preferred amongst people who took our survey. I am trying to predict the optimal combination of variables to create the most preferred…
Andrew Colin
  • 155
  • 1
  • 11
2
votes
1 answer

Persistent Computational Singularity in mlogit

My problem has to do with persistent computational singularity when trying to use the mlogit package. First, a little bit about my data: My data concerns predicting choice in the context of a sports draft. Each team makes an ordered selection from…
CRS1834
  • 111
  • 1
  • 6
2
votes
1 answer

R mlogit throws Error in solve.default(H, g[!fixed]):system is computationally singular: reciprocal condition number

I'm trying to do discrete choice modeling on the below data. Basically, 30 customers have 16 different choices of pizza. They can choose more than 1 type of pizza and the ones they choose is indicated by choice variable. pizza cust choice pan thin…
kamal tanwar
  • 197
  • 8
2
votes
1 answer

Setting up an Mlogit in R with many observations for each category

I'm trying to use Mlogit in R, I'm a little new to logits, and I'm having trouble setting up my problem in the Mlogit framework. I'm actually not entirely sure that mlogit is the right approach. Here is an analogous problem. Consider a baseball…
Sam Asin
  • 131
  • 9
2
votes
0 answers

How to code unranked alternatives in mlogit with ranked=TRUE

I need to run a rank-ordered logit where some individuals ranked a maximum number of alternatives, and some ranked fewer than that maximum. mlogit::mlogit.data doesn't like when the input data has differing numbers of ranks per individual. Here's a…
MDe
  • 2,478
  • 3
  • 22
  • 27
2
votes
1 answer

(list) object cannot be coerced in clogitLasso

I have a problem with the package clogitLasso where I continually get the error "(list) object cannot be coerced to type 'double'" I've done plenty of searching on this, and there are plenty of ways to pre-convert the data to solve this problem, but…
NickCHK
  • 1,093
  • 7
  • 17
2
votes
0 answers

Python multinomial logit with statsmodels module: Change base value of mlogit regression

I have a little problem which I am stuck with. I am building a multinomial logit model with Python statsmodels and wish to reproduce an example given in a textbook. So far so good, but I am struggling with setting a different target value as the…
T1B
  • 21
  • 1
  • 4
2
votes
1 answer

ChoiceModelR, none=TRUE, "Error in betadraw[good, ] = newbeta[good, ]"

I am using ChoiceModelR for hierarchical multinomial logit. I want to get estimates for the utility of the outside good (which follows a normal distribution). The outside good has no covariates like the inside goods - e.g. it cannot have a price or…
Marton
  • 21
  • 1