283 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
135
views
mlogit: Error in idx_name.dfidx(x) : More than one idx column
My data are in the data df:
data <- structure(list(personID = c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L),
problem = c(1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L), choice = c("Right",
...
0
votes
1
answer
101
views
Simulating a Discrete-Choice/Multinomial Model
I want to simulate a Discrete-Choice/Multinomial model. Consider the situation where I have 100 people each with four choices (1 = air, 2 = bus, 3 = car, 4 = train).
There is a baseline preference ...
0
votes
0
answers
16
views
summary of mlogit does not show the full term name for 2-way interactions
I'm using mlogit to run a multinomial logistic regression on a DV with 3 levels (alternatives, corresponding to direction of saccades in an eyetracking study: 1. different 2. dir. no saccade 3. same ...
1
vote
0
answers
70
views
Issue with gmnl() in R - Error: "Random variables are not in the data"
I am currently trying to run a mixed logit model using the gmnl() function from the gmnl package in R. However, I keep encountering an error related to the random variables. The error message is:
&...
0
votes
0
answers
66
views
How do I get correct coefficient names for the interaction terms with R mlogit?
I am using the mlogit function from the mlogit package on R to run a multinomial logit regression. When I added an interaction term for a pair of individual-specific variables, the mlogit result didn'...
1
vote
0
answers
74
views
Error in using mlogit function: "replacement has 8 rows, data has 9"
I am trying to estimate a simple multinomial logit model. The utility of a product is given by:
U_{ij}=\beta⋅price_{ij}+fixed_effect_j+ε_{ij}.
I have data which contains the choices made by ...
1
vote
0
answers
38
views
R programming : is there something wrong with the coefficient function for mlogit (mixed logit) model?
FYI: modelQ2_1 is a mixed logit model
#Edited - Sorry for not providing the staging ground to reproduce the problem.
library(mlogit)
library(dfidx)
data("Electricity", package = "mlogit&...
0
votes
0
answers
79
views
How to calculate predicted probabilites for MNL models estimated with mlogit() in R?
I have estimated a Multinomial Logit (MNL) Model using mlogit() from the R package mlogit:
df_long<- mlogit::mlogit.data(data = df_wide, choice = "vote", shape = "wide")
...
0
votes
1
answer
96
views
How to plot coefficients from glmnet multinomial object using coefplot() in r?
I am trying to visualise coefficient estimates, produced by a glmnet multinomial model, using coefplot. I know, at least, the implementation of coefplot in Stata supports plotting multinomial model ...
1
vote
0
answers
21
views
missing z-value in 'logitr' package for wiliingness to pay
I'm researcher in economic analysis of green infrastructure.
I tried to use r package 'logitr' for estimating wtp of garden and green area.
but I couldn't get a clear results of z-value.
model fitting ...
1
vote
1
answer
273
views
Logit function and marginal effects
I have 2 approaches to calculate my marginal effects.
The first model is the following
model1 <-
feglm(
FTAs ~
log(dist) +
log(gdp_d) +
...,
family = binomial(link =...
2
votes
0
answers
131
views
Choice Experiment - Trouble with WTP Calculation in R
I'm currently working on a research project and facing some challenges with WTP (Willingness to Pay) calculation using R. I would greatly appreciate any guidance or insights you could provide.
I ...
0
votes
1
answer
85
views
Reverse engineering values for mlogit logsum function applied to a choice model
I have a dataset of observed choices (N = 26 alternatives) and a corresponding range of predictor variables. The data have been split into training and test subsets, Data_Train and Data_Test.
I have ...
1
vote
0
answers
263
views
How to get average marginal effects (AMEs) with standard errors of mlogit or clogit in R?
I am fitting a conditional logit model in R and want to compute the average marginal effect of a binary predictor (wait_long: 1 if wait time is >= 30). How should I do it? Any thoughts are welcome (...
0
votes
1
answer
169
views
How to fit Multinomial logistic regression model with multilevel independent variables in stata or r
I have travel data consisting of a person selecting a specific mode of transport (e.g., Car) over other options (e.g., Bus, Plane, and Train) and paying a certain price for the distance he travelled. ...