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

gmnl Error 'no index for "choiceid" variable'

I have been able to make a mlogit.data object to input into the gmnl package for latent class analysis but I keep running into the problem where it says the choiced variable has no index. I saw there was another question about the same problem but…
Miha04
  • 23
  • 5
1
vote
0 answers

discrete choice experiment data preparation for analysis using GMNL package

I have conducted a discrete choice experiment using google forms and written up the results in a csv in excel. I am having problems understanding how to take the data from a standard csv format to a format that I can analyse using the gmnl…
Miha04
  • 23
  • 5
1
vote
1 answer

Marginal effects from the multinomial model

I am trying to get the marginal effects from a multinomial model derived from the mlogit package but it shows an error. Can anyone provide some guidance to solve the problem? Many thanks! # data df1 <- structure(list(Y = c(3, 4, 1, 2, 3, 4, 1, 5, 2,…
cliu
  • 933
  • 6
  • 13
1
vote
1 answer

singular error when compute a specific variable mlogit (nested)

i'm using data from ("TravelMode", package = "AER") and try to follow [Heiss,2002] paper this is what my code look like initially Nested Structured Picture library(mlogit) data("TravelMode", package = "AER") TravelMode_frame <-…
1
vote
0 answers

Marginal Effects of conditional logit model in R using, "clogit," function

I am trying to figure out how to calculate the marginal effects of my model using the, "clogit," function in the survival package. The margins package does not seem to work with this type of model, but does work with "multinom" and "mclogit."…
1
vote
0 answers

Alternative Specific Conditional Logit in R

I am trying to run an alternative specific conditional logit in R but keep getting the error when I use the mlogit function: "Error in dfidx::dfidx(data = data, dfa$idx, drop.index = dfa$drop.index, : the two indexes don't define unique…
Ryan Gifford
  • 87
  • 1
  • 9
1
vote
1 answer

Graphical representation of a series of probabilities from logistic model with R

I want to make a graph of a series of predictions on a logit model in R. The model is as follows: modelo_logit3 <- glm(formula = Sold ~ price+age+poor_prop+airport, data = datos, family = binomial) summary(modelo_logit3) Call: glm(formula = Sold ~…
1
vote
0 answers

can you have observations without choice in pylogit?

I have data in long format where lets say user 1 has 10 alternatives but did not chose any alternative so CHOICE is all 0. The problem i get is that when i include those users all model parameters are set 0. I do not understand why it is happening…
1
vote
1 answer

Efficient Montecarlo simulation over a grid in R

I am running a Montecarlo simulation of a multinomial logit. Therefore I have a function that generates the data and estimates the model. Additionally, I want to generate different datasets over a grid of values. In particular, changing both the…
1
vote
1 answer

Mlogit: how to intrepret model adequacy on fitstat

Two questions regarding mlogit: How exactly do you interpret goodness of fit using fitstat? Is it the R2? or the P-value of LR test? Can the RRR be equated to an odds ratio
Epijam
  • 11
  • 2
1
vote
0 answers

Can't fit a mixed mlogit model on r

I'm trying to fit a mixed logit model in R using the mlogit package. This is a sample of my data: Persona Proposito MediosUsados ModoPriPub ModoMotor TiempoViaje Sexo AdultoMayor Estudios
yieniggu
  • 384
  • 1
  • 7
  • 20
1
vote
2 answers

Trying to maintain index when using gather

I am trying to convert my data from wide to long, but for some reason, the ID column does not show up after the conversion. This is what my data looks like: > head(dca) # A tibble: 6 x 11 ResponseId Q9 Q10 Q11 Q12 Q13 …
1
vote
0 answers

R Mlogit Error in replacement rows and impossible to coerce choice variable to logical

I want to run the mlogit function on my discrete choice dataset. Below I have provided the data and the lines of R code utilizing the package mlogit that are producing the errors. I am getting an error when running the full dataset about the…
chaimocha
  • 27
  • 1
  • 6
1
vote
2 answers

Can I analyze non-varying-across-individual alternative-specific attribute variables?

I would like to run a discrete choice analysis with an individual-specific variable and what I think are alternative-specific attribute variables. From the mlogit vignette I think the individual-specific variable is a "choice situation specific…
JOgawa
  • 23
  • 3
1
vote
0 answers

Package that previously worked now unpacks with "non zero exit status"

A package that I previously used, "mlogit", is now not unpacking in R. I have manually typed it in as well as using the install packages tool. Although it says "successfully installed", it is not unpacked and does not show up in the Rstudio list of…