Questions tagged [multinomial]

The multinomial distribution provides a probability distribution over three or more possible outcomes. It generalizes the more fundamental binomial distribution (two outcomes).

In probability theory, the multinomial distribution generalizes the binomial distribution to three or more outcomes.

Suppose two chess players had played numerous games, from which we estimate that Player A would win with probability 0.40, Player B would win with probability 0.35, and the probability that the game ends in a draw is 0.25. The multinomial distribution can be used to answer questions like:

  1. If these two chess players played 12 games, what is the expected number of wins, losses, and draws for player A?
  2. If these two chess players play 3 games, what is the probability that A wins one, B, wins one, and they draw on the other?

Binary classification/prediction methods (such as logistic regression) can also be generalized for multinomial outcomes (i.e., three or more class labels). Multinomial logistic regression is also sometimes called a maximum entropy (MaxEnt) model.

421 questions
0
votes
0 answers

Replicate Stata's marginal effects from multinomial logit regression in R

I am trying to replicate Stata's marginal effects from multinomial logit models in R but with no success. For the multinomial logit model, I used the multinom() function from the nnet package and for the marginal effects I used the margins package…
cliu
  • 933
  • 6
  • 13
0
votes
1 answer

How to add interaction terms in multinomial regression

I am using the mlogit function from the mlogit package to run a multinomial logit regression. I am not sure how to add interaction terms into my model. Here is a toy dataset and my attempt to add interactions: library(mlogit) data <-…
cliu
  • 933
  • 6
  • 13
0
votes
1 answer

Comparing predicted probabilities from multinomial models in h2o gbm

I ran a h2o gradient boosting classifier model to predict probabilities for three classes 0,1 and 2. There is a heavy class imbalance (93:5:2) in the training data. Although the individual classes 1 & 2 are not correctly predicted in confusion…
mrrob
  • 3
  • 2
0
votes
0 answers

Gradient boosting for multinomial clasification in R?

I am using gradient boosting for a multinomial classification problem. I have a warning message after I run my code. This is one example of documentation. data(iris) iris.mod <- gbm::gbm(Species ~ ., distribution="multinomial", data=iris, …
Pastor Soto
  • 336
  • 2
  • 14
0
votes
1 answer

Receiving error: "Unknown random parameter" , when defining rpar in mlogit() [Random parameter logit model]

I want to estimate a multinomial logit model(mixed logit) with heteroskedastic customer "brand preferences" (random parameter logit model) using mlogit() function. The dataset is the saltine Cracker dataset and users can choose among 4 brands.…
0
votes
1 answer

Generating multinomial random data in R

I am trying to generate data from a multinomial distribution in R using the function rmultinom, but I am having some problems. The fact is that I want a data frame of 50 rows and 20 columns and a total sum of the outcomes equal to 3 times n*p. I am…
Bibi
  • 87
  • 9
0
votes
1 answer

Multinomial Logistic Regression in R

I have tried to find many resources about multinomial regression. However, I am having a hard time finding visualizations that would show probability of a multiclass response variable given a multiclass dependent variable. I have an example below…
casanoan
  • 27
  • 1
  • 5
0
votes
2 answers

How to predict data outside of the training data set

using this module to predict country names from address: import re import numpy as np import pandas as pd from sklearn.naive_bayes import MultinomialNB from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import…
A.Rahman Mahmoud
  • 328
  • 1
  • 3
  • 17
0
votes
1 answer

How to Interpret a Coefficient table for Multinom() Function in R

I have a dataset that has weather=0 if temp is <65 degrees Fahrenheit, weather = 1 if temp is =65 degrees Fahrenheit, and weather = 2 if temp is >68 degrees Fahrenheit. I need to estimate a probability that the temp is between 65 <= weather < 68…
0
votes
1 answer

Calculation of log likelihood function of multinomial logistic regression in R

Suppose I have the following data set df=data.frame(x1=rnorm(100), #predictor 1 x2=rpois(100,2.5), #predictor 2 x3=rgeom(100,prob = 0.48), #predictor 3 y=as.factor(sample(1:3,100,replace = T)) #categorical…
Uddin
  • 754
  • 5
  • 18
0
votes
1 answer

svymultinom in R

I'm using a large dataset and have run several logistic regressions with svyglm(). I am now examining a dependent variable with at least 5 possible outcomes. I discovered svymultinom but I'm having trouble with the code. I get the following…
nerak31
  • 1
  • 1
0
votes
1 answer

Package for Multivariate Multinomial Logit

I would like to jointly estimate 3 variables. Two of them are categorical and the other one is binary. So I thought about a "multivariate multinomial logit model". I found a lot of theory about it (for Example Agresti 2007 Ch. 9 or Beel and Paap…
0
votes
2 answers

How to get multiple predictions rather than a focal prediction from multinomial regression model (i.e., split by factor variable)

I want to run a multinomial regression to get the average frequency of each choice of a close question, split by a factor (gender: male/female). Background I want to compare 4 types of cheeses to measure each one's popularity, out of 4…
Emman
  • 3,695
  • 2
  • 20
  • 44
0
votes
0 answers

error involving unique observations using mlogit

I am trying to run a mixed effect multinomial model. Below is some of my data. id outcome x 1008 two -0.36759425 1008 two -0.36759425 1008 two -0.36759425 1008 two …
D. Fowler
  • 601
  • 3
  • 7
0
votes
0 answers

Penalised multinomial discrete time competing risk model for variable selection and predictions

I have a problem trying to fit a penalised multinomial model that helps in variable selection. The data consist of per semester record of students performances from registration to either dropout or completion. So I have multiple record per student…
lionel
  • 1
  • 1