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
1
vote
1 answer

What could cause the incorrect number of linear predictors in the multinom family of a multinomial GAM?

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 <- gam(list(Genotype_nr ~ s(Ratio, Doy) + …
1
vote
0 answers

Multinomial mixed effect model in R

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 native_driftertype a factor with 5 levels, treat a factor with…
user21291330
1
vote
1 answer

How can you get confidence intervals for expected percentages of outcomes in a multinomial regression in R?

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 provide values that go out of the possible…
Jamie
  • 401
  • 3
  • 11
1
vote
1 answer

How to create predicted probability plot?

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 I had to create a plot of predicted probabilities…
1
vote
0 answers

AutoML H2O gives multinomial result instead of binomial

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 after the model is found it turns out that H2O regarded it as a…
1
vote
1 answer

TensorFlow.js tf.multinomial unexpected result [62083, 37917] instead of [75000, 25000]

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 happening and how I can get the expected result? I am a…
pataiadam
  • 69
  • 5
1
vote
0 answers

plotting marginal effects of multinomial logistic regression in R

UPDATE BELOW I am running a logistic regression model in R, in which the DV has four categories, one of which, however, is the baseline. The baseline category represents the absence of the phenomenon I am predicting, whereas the other three…
1
vote
0 answers

getting recall and precision of score function in MultinomialNB in sklearn

I want to get the recall and precision in my prediction but I got confused. This function "score" in MultinomialNB in sklearn has no capability to return a predicted list or a thing that help me to reach the precision and recall.For example: from…
Vali
  • 11
  • 1
1
vote
1 answer

How to create a categorical variable in R using 2 binary variables that takes on 1 of 4 possible values (combination of the 2 binary variables)?

I'm trying to construct a multinomial logit regression model using this categorical variable as my dependent variable. In my data, the two binary variables represent whether an individual lives in a metropolitan area (RESMETRO) and whether an…
1
vote
2 answers

Multinomial regression : how to show all coefficients without L, Q and R?

I have this dataframe that I applied multinom function df = data.frame(x = c('a','a','b','b','c','c','d','d','d','e','e','f','f', 'f','f','g','g','g','h','h','h','h','i','i','j','j'), y =…
Anas116
  • 797
  • 2
  • 9
1
vote
1 answer

Choose from multinomial distribution

I have a series of values and a probability I want each those values sampled. Is there a PySpark method to sample from that distribution for each row? I know how to hard-code with a random number generator, but I want this method to be flexible for…
Justin Davis
  • 203
  • 2
  • 6
1
vote
0 answers

Linear Transformation of Dirichlet Distribution

I am wondering what is the best way to represent the probability distribution of a linearly transformed Dirichlet distribution: let {X = [x1, x2 ... xn] | Σxi = 1} be a set of multinomial probabilities that follow a Dirichlet distribution…
1
vote
0 answers

Multinomial mixed effects model R

I want to run a multinomial mixed effects model with the mclogit package of R. Below can be show the head of my data frame. > head(mydata) ID VAR1 X1 Time Y other_X3 other_X4 other_X5 other_X6 other_X7 1 1 1 1 1 10 0 0 …
Didie
  • 31
  • 3
1
vote
2 answers

How to Test the significance of difference in mean estimates in R?

Solved: I'm working on market research and want to conduct a Multinomial Logit Model by R based on the estimation below. It is designed to test whether consumers' exposure to specific advertisements could influence their preferences for the…
Sissie
  • 11
  • 2
1
vote
1 answer

Clustered standard errors, stars, and summary statistics in modelsummary for multinom models

I want to create a regression table with modelsummary (amazing package!!!) for multinomial logistic models run with nnet::multinom that includes clustered standard errors, as well as corresponding "significance" stars and summary…