421 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
40
views
Estimate pairwise comparisons in marginaleffects for a multinomial model with an intercept only
There's something that's trivial to do in emmeans but it eludes me in marginaleffects.
Imagine you want to estimate a multinomial logit model with nnet::multinom().
library(tidyverse)
library(nnet)
...
2
votes
1
answer
92
views
Multinomial Regression and non-functioning predicts()-function
I have to do some work in R for university and I'm stuck. When I use the predicts() function from the glm.predict package, I keep getting an error message that I don't understand. Codes that I get ...
2
votes
1
answer
272
views
Multinomial regression with statsmodels.formula.api is not working for me
Whenever I try to build a multinomial regression using the R-style formula approach in statsmodels in Python, I get ValueError: endog has evaluated to an array with multiple columns...
Here's a ...
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
113
views
"param = glm" gave a singular matrix warning while "param = ref" did not
I'm conducting a multinomial logistic regression model using proc logistic in SAS with around 3.6 million observations, an outcome with 5 levels, and dozens of categorical predictors. I had no issue ...
1
vote
2
answers
84
views
Simulating from Dirichlet Multinomial distribution
I would like to create a matrix of 1000 rows and 91 columns filled with integers generated by the Dirichlet Multinomial distribution.
What I have achieved so far is fine for creating only one matrix (...
0
votes
1
answer
82
views
brmultinom brglm2 vifs and dredge dont work
I am fitting a brmultinom now (instead of previous multinom), but I can not get the VIF or dredge function working on the new model. Any advise?
my code is
library(MuMIn)
options(na.action = na.fail)
...
0
votes
0
answers
124
views
Missing category in reference level in multinomial GAM with mgcv in R
Consider the multinomial GAM with mgcv in R
library(mgcv)
multinom = gam(list(sound ~ word + s(long, lat),
~ word + s(long, lat),
~ word + s(long, ...
0
votes
1
answer
411
views
Step failure (and iteration limit) in multinomial GAM with mgcv in R
I have a data set with 40 sites (long, lat) by 2 ages by 2 genders by 6 words and 6 dependent sound categories (coded 0 to 5) as simulated here:
sound <- sample(0:5, size=960, replace=T)
...
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 ...
2
votes
0
answers
76
views
Joint hypothesis test with marginaleffects::hypotheses from a nnet::multinom object
I have a multinomial logistic regression model, fitted with nnet::multinom(). My outcome has three categories and I have used one predictor in the model. Ultimately I want to jointly test the null ...
1
vote
1
answer
222
views
Estimate Dirichlet parameters from multinomial regression
I am trying to use the predicted probabilities from a multinomial regression using multinom function from the nnet package in R to estimate the parameters for a Dirichlet distribution while taking ...
0
votes
0
answers
104
views
Estimating Multinomial Logit using xlogit vs. statsmodels
I am trying to estimate a multinomial logit with Python for a discrete choice model. I come from R, where the estimation of the coefficients is the same, but not the predictions.
I am using a known ...
1
vote
0
answers
196
views
Using PSweight for multilevel variable analysis to calculate IPW
I have a data frame named "df", with a treatment variable named "treatment", which is categorical with three values (0 to 2), I also have five other covariates (cov1 to cov5; where ...
-1
votes
1
answer
44
views
usage of multinomial assign javascript? [closed]
It is possible to assign multinomial variable in javascript like
let a = 10;
let b = a = 2; // like this
console.log(`a - ${a}, b - ${b}`); // prints "a - 2, b -2"
However, I could not find ...