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

Modelling a sampling with replacement, given probabilities

I would like to model a sampling with replacement in R (like the urn model). That is, I have three different events (say: 1,2 and 3 (in fact they a categorical but I think this is not important at the moment)) and I know the probability of each…
KikiRiki
  • 47
  • 6
0
votes
1 answer

Dimension mismatch when trying to use dmulti with rjags

I am trying to fit the model below using rjags but I get a dimension mismatch error. The model runs well in WinBUGS and I can't figure out how to change the code. Thanks in advance for any help. Data: dataset <- list(n1 = 462, n2 = 537, …
Oswaldo
  • 65
  • 3
0
votes
1 answer

MATLAB Multinomial Logistic Regression Inputs

This is my first time attempting to use multinomial logistic regression, and I'm having a hard time getting started. I currently have a dataset of 203 observations with 22 independent variables and 1 dependent variable, all of which are numerical…
dwm8
  • 309
  • 3
  • 16
0
votes
0 answers

Trying to create an AICc table but receiving aictab error message

I'm trying to create an AICc table for a number of multinomial logistic regression models. However, when I try to run the line: aictab(cand.set = Cand.mod, modnames = Modnames) I get the error message: Error in…
user29836
  • 1
  • 1
  • 3
0
votes
0 answers

Generating a multinomial distribution

I am trying to write/find a code piece/function which gives back a multinomial distribution given a number and a probability array, say a function: Mult(N, pp[]) For example, for pp={0.3, 0.2, 0.5}, (pp can have variable sizes, say 2 to 10…
0
votes
0 answers

R package multgee -- initial values

I'm working on estimating a generalized estimating equation in R. I have a multinomial (ordinal) outcome, and so I have been attempting to use the package multgee since, as far as I know, packages like geepack or gee don't allow for the estimation…
Jess A.
  • 85
  • 1
  • 5
0
votes
0 answers

How to manually score multinomial regression data in SAS?

suppose I ran a multinomial logistic regression in SAS..there are 3 levels of the dependant variable... Suppose I have a model with estimates for some significant variables.. How do I manually score this in SAS? Is there an easy way of doing…
user2724207
0
votes
2 answers

ValueError: Can't handle mix of unknown and binary

i have recently used scikit-learn for sentiment analysis, so after i have trained my labeled data then tried to test them on unlabeled set of data, this error comes up 'ValueError: Can't handle mix of continuous-multioutput and binary' i think that…
0
votes
1 answer

KeyError while printing trace in PyMC

I had read that by default some names are assigned to Stochastic vaiables. I am writing the relevant portion of my code below. lam = pm.Uniform('lam', lower=0.0, upper=5, doc='lam') parameters = pm.Dirichlet('parameters',[1,1,1,1],…
turing
  • 577
  • 1
  • 4
  • 12
0
votes
1 answer

MAP in PyMC is giving unexpected error

I don't understand why MAP is giving error where as MCMC works fine in the same scenario? I am writing below the relevant part of code. tau = Uniform('tau', lower=0.01, upper=5, doc='tau') rv = [ Multinomial("rv"+str(i), count[i],…
turing
  • 577
  • 1
  • 4
  • 12
0
votes
1 answer

why multinom() predicts a lot of rows of probabilities for each level of outcome?

I have a moltinomial logistic regression and the outcome variable has 6 levels: 10,20,60,70,80,90 test<-multinom(y ~ x1 + x2 + as.factor(x3) ,data=data1) I want to predict the probabilities associate with each level of y for each set of given…
0
votes
1 answer

How does the function multinom from R package nnet compute the multinomial probability weights?

I know the theoretical answer to the question of my title, which is discussed here or in this previous question on Stack Overflow. My problem is that, even considering some numerical roundings, the probability weights I compute using the…
Pippo
  • 1,543
  • 3
  • 21
  • 40
0
votes
1 answer

R, Multinomial Regression: How to Find Conditional Probabilities?

In R, given a multinomial linear logit regression, I would need to obtain the conditional probability given some values of the predictors. For example, using the function multinom from the package nnet, imagine to have computed fit <-…
Pippo
  • 1,543
  • 3
  • 21
  • 40
0
votes
1 answer

How to get distribution of sum of dependent bernoulli variables

I have N bernoulli variables, X1, ..., XN, and Xi~B(1, pi), pi is known for each Xi, and Y=X1+...XN, now I need to get the destribution of Y. If Xi and Xj is independent when i!=j, then I can use the simulation: 1. Generate `X1`, ..., `XN` via their…
PepsiCo
  • 1,399
  • 4
  • 13
  • 18
0
votes
0 answers

Multinomial Clustering in [R]: While loop error "missing value where TRUE/FALSE needed"

I'm trying to implement EM algorithm. I'm using a while loop to iterate while the change in my output matrix is larger than some threshold but I receive an error saying "Error in while (delta >= tau) { : missing value where TRUE/FALSE needed" Below…
1 2 3
27
28