Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
0 replies
29 views

Is there a way to fit the mnps function from r twang on mice imputed mids dataset ? My treatment variable is a multilevel multinomial variable. This is my toy dataset library(mice) library(...
Clifton Pinto's user avatar
1 vote
2 answers
106 views

I have a multinomial model and am trying to estimate marginal effects for my model predictors, i.e., "how does the probability of choosing option C over A change when X increases 1 unit, or when ...
new123's user avatar
  • 39
2 votes
1 answer
61 views

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) ...
tomw's user avatar
  • 3,291
2 votes
1 answer
97 views

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 ...
user31732487's user avatar
2 votes
1 answer
311 views

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 ...
Brian Bull's user avatar
0 votes
1 answer
110 views

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 ...
kpr62's user avatar
  • 585
0 votes
0 answers
133 views

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 ...
黃祐谷's user avatar
1 vote
2 answers
98 views

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 (...
stefano's user avatar
  • 425
0 votes
1 answer
97 views

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) ...
Sofia's user avatar
  • 95
0 votes
0 answers
131 views

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, ...
David's user avatar
  • 117
0 votes
1 answer
453 views

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) ...
David's user avatar
  • 117
1 vote
0 answers
79 views

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 ...
user20380762's user avatar
2 votes
0 answers
80 views

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 ...
ASt's user avatar
  • 21
1 vote
1 answer
228 views

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 ...
Marco Pastor Mayo's user avatar
0 votes
0 answers
120 views

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 ...
user25274814's user avatar
1 vote
0 answers
207 views

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 ...
crytpodoc's user avatar
-1 votes
1 answer
45 views

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 ...
Juneyoung Oh's user avatar
  • 7,754
0 votes
1 answer
289 views

I am trying to find out factors that affect the knowledge of making Juice. I have identified Multinomial logistic regression as a suitable method. Here is my original data. I am following the example ...
Amelia Nicodemus's user avatar
1 vote
0 answers
160 views

I am trying to run a Mixed Effect Multinomial Logistic Regression Model in R using mixcat package and npmlt() command. Two random effects (participant id ("id" and day ("tag") ...
Cristina Balemi's user avatar
2 votes
0 answers
191 views

I want to fit a multinomial response mixed effects model. I'm using the mblogit function from the mclogit package. From the help(mblogit) example I can fit a fixed effects model (which is structurally ...
Spacedman's user avatar
  • 94.7k
0 votes
2 answers
1k views

Is there an easier way to create a predicted probabilities graph with confidence intervals for a multinomial logistic regression with an interaction term? I have the following code below, which seems ...
hy9fesh's user avatar
  • 681
0 votes
1 answer
441 views

I want to obtain pooled average predictions per level of a categorical variable using a multinomial regression on multiple imputed data. My problem is that the pool() function seems to collapse all ...
usual_user16960220's user avatar
0 votes
1 answer
234 views

To calculate the probability for categorical features, I was told to use the Multinoulli distribution, which is supposedly a special case of the multinomial distribution, where the number of trials is ...
Kajice's user avatar
  • 722
2 votes
1 answer
52 views

There is a holiday party with 6 people. Each of the 6 people have an estimate for their gifts_brought, and each person has an estimate for their chance of receiving another person's gift (...
CoolGuyHasChillDay's user avatar
1 vote
0 answers
203 views

I am new to R, I am trying to run a multinomial fixed effect regression. I am using the feglm function from'fixest' package. This is the model, reg<-feglm(diar~c1+c2+rural+c1rural+c2rural+religion+...
Lamya's user avatar
  • 11
0 votes
1 answer
182 views

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. ...
Sorath Abbasi's user avatar
0 votes
0 answers
78 views

I have made a multinomial model using multinom() from the nnet package. I am trying to do internal validation and update the model but I need the linear predictor values from the model and I cannot ...
andyroo's user avatar
  • 11
2 votes
5 answers
213 views

I am working with the R programming language. I am trying to write an R function that can fully expand a mathematical expression (in symbolic form) of the form: (a+b+c+....)^n In the above expression, ...
stats_noob's user avatar
  • 6,985
3 votes
2 answers
341 views

I have three numbers: lp_1 <- -316480 lp_2 <- -85041 lp_3 <- -1197042 The goal is to sample a multinomial distribution with probabilities proportional to the exp(lp_i). With these numbers, ...
Stéphane Laurent's user avatar
0 votes
0 answers
221 views

Currently trying to use ggeffects for a mmblogit object from the mclogit package, but the following messages are being shown: > ggeffects::ggeffect(model.example) Can't compute marginal effects, '...
gustavobrp's user avatar
1 vote
1 answer
1k views

I'm currently running multinomial logistic regressions with R using nnet package; multinom function. I have 16 IV and one DV. Using the tbl_regression function i can get the contribution of each DV to ...
félix bélanger's user avatar
0 votes
1 answer
168 views

I am trying to fit a mixed effects multinomial model for my 4 level categorical outcome variable (y). I am using the gamlss function from gamlss package. The call looks like: library(mixcat) data(&...
bison2178's user avatar
  • 789
7 votes
2 answers
6k views

I am attempting to run a multinomial logistic regression with at least 1 (but ideally 2) random effects in R and have been very unsuccessful. It seems like there are very few packages that can handle ...
MrCitywide's user avatar
2 votes
3 answers
85 views

Having a dataset with an arbitrary number of columns N and rows T, I would like to obtain all the columns implied by a multinomial expansion of the columns sum raised to an arbitrary degree d. To be ...
oibaFox's user avatar
  • 141
1 vote
0 answers
339 views

I wonder if R has a function that can compute the predicted probabilities from the multinomial logistic regression coefficients (not the model), assuming that we do not have the model and what we have ...
Nader Mehri's user avatar
0 votes
0 answers
288 views

Multinomial regressions necessitate a reference level, and one can change the reference level using options like relevel(), but is there an alternative reference, that isn't one of the levels? My ...
Maria Gold's user avatar
3 votes
1 answer
502 views

I have a survey data, with categorical variables. I would like to compute the proportion for each responses in Q1, as well as generating the confidence interval or uncertainty around the estimate. Is ...
51238888's user avatar
0 votes
1 answer
332 views

I am running a multinomial model with hunting season as mixed effect using the mblogit function. The model runs perfectly but I cannot run the Anova function (car package) to get an analyses of ...
S_vdp's user avatar
  • 1
0 votes
0 answers
186 views

I wonder if there are Stata codes available to assess the model performance of a multinomial logistic model such as discrimination (AUC) for each outcome and diagnostic accuracy. I am trying to fit a ...
Ela's user avatar
  • 1
0 votes
0 answers
448 views

I want to run a multinomial mixed model for my Msc thesis with hunting season as a random factor. I found that the mblogit function normally should be able to do the job, however, I got error. Summary ...
S_vdp's user avatar
  • 1
0 votes
1 answer
72 views

I want to run a multinomial regression inside a function (regression_fun) and return the multinom object to work further with that. But the summary() of the returned object does not work but gives the ...
sebastiann's user avatar
1 vote
0 answers
310 views

I'm learning about multinomial logit and I have a problem running this code using xlogit. # Long format from xlogit.utils import wide_to_long ATUS_data_LA_2020_Long = wide_to_long(...
Catalina V's user avatar
1 vote
1 answer
341 views

Consider the following model modeling nine genotypes (integer numbers) by their growth pattern (The ratio of plant height growth over plant diameter growth) over time (in day of the year). m2 <- ...
Bertold Mariën's user avatar
1 vote
0 answers
280 views

I would like to make a multinomial model with random effects, but I don't know how. The model would look like this: native_driftertype ~treat+(1|replica)+(1|compartment/originhive), with ...
user avatar
2 votes
1 answer
286 views

I would like to get confidence intervals for the percentages of difference outcomes expected from an intercept only multinomial regression. The package emmeans provides confidence intervals but they ...
Jamie's user avatar
  • 521
1 vote
1 answer
190 views

Using the debt data set from the package faraway. So basically firstly I was asked to create a model using multinom function and use ccarduse as the response and prodebt as the single covariate. Then ...
Predicted mod's user avatar
1 vote
0 answers
113 views

I am trying to proccess the dataset kr-vs-kp using AutoML H2O. The dataset has two possible target values "nowin" and "win", so I suppose it should be binary classification. But ...
Vladislav Daniel Kovalevsky's user avatar
0 votes
1 answer
755 views

It seems the functions for manipulating labels and levels in tbl_regression tables do not work with multinom from the nnet library. Here is reproducable code with the resulting tables. Does anyone ...
Chris_S's user avatar
  • 21
1 vote
1 answer
77 views

I am using the tf.multinomial function from the TensorFlow.js library and I expect to get the result of [75000, 25000] but instead I am getting [62083, 37917]. Can someone explain why this is ...
pataiadam's user avatar
0 votes
1 answer
121 views

I have a table with frequencies for control and treatment group for a multinomial factor (`response'), with three levels (Negative, Neutral, Positive). I want to calculate for each levelthe difference ...
menomale's user avatar

1
2 3 4 5
9