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

Build a multinomial logit model for a sample from a multinomial distribution

I have data from several subjects on what proportion of their time they spent in each quarter of a square-shaped room. Here is a sample data: a <- rmultinom(12, 100, c(0.1, 0.4, 0.3, 0.2)) a / apply(a,2,sum) ### not running, but I would like to…
Agoston T
  • 173
  • 1
  • 4
0
votes
1 answer

Unexpected coefficients from Spark multinomial Logistic Regression

I run Spark 2.1.1 on my Mac, OS Sierra (should this be helpful). I tried to fit a multinomial logistic regression on a test dataset I found online, I report here the first few lines (I don't know how to attach the file…
0
votes
0 answers

Prediction Probabilities are Incorrect in Multinomial Regression

Im creating a multinomial model to predict outcomes of hockey games. Packages library(tools) library(utils) library(dplyr) library(nnet) library(VGAM) library(mlogit) library(foreign) dataset structure(list(GID = 1:20, Date = structure(c(17097,…
0
votes
1 answer

separating `multinom` estimations by response (nnet package) in R

In a multinomial logistic regression, one uses a set of covariates (x1, x2, ... xn) to predict the value of a discrete variable y that, for instance, can take the values of "outcome a", "outcome b", and "outcome c". In R, the most popular way to…
Carl H
  • 1,036
  • 2
  • 15
  • 27
0
votes
0 answers

R mlogit error : Error in .subset2(x, i, exact = exact) : no such index at level 1

I have a wide data set that I have converted into long format for estimating in mlogit. In the data I have NO alternative specific data, the values are the same for all alternatives. str(f) 'data.frame': 60 obs. of 6 variables: $ Outcome: logi …
Stephen Clark
  • 573
  • 3
  • 18
0
votes
1 answer

Can you implement an offset in h2o.gbm with a multinomial response (K > 2)?

My goal is take the outcome class probability predictions from another model (or wherever, really), and use them as an offset in h2o.gbm with distribution = "multinomial". I noticed in the nnet package, the multinom() function allows for an offset…
MatthiasK
  • 47
  • 6
0
votes
0 answers

R: multinom. Plenty of memory but still get memory error

I am using 64 bit R (not RStudio) I am getting the following error: nounsResults <- multinom(Major1 ~ ., data = nouns, MaxNWts=120000) weights: 101332 (100521 variable) Error: cannot allocate vector of size 512 Kb But I have plenty of…
Jake
  • 4,322
  • 6
  • 39
  • 83
0
votes
0 answers

What is the interpretation of different formula in Multinom?

I want to run a multinomial logit regression using the multinom() function from the nnet R package. I need some help with the interpretation of different formulas. My dataset have 3 IV (age (3 levels) , presonality(4 levels)and Test(2 levels))an 1…
NOVA
  • 1
0
votes
0 answers

Multinomial Regression with all categorical predictors

I have a dataframe that is 10191x2. My predictor variable is categorical and my response is also categorical. Below are some of the rows of this dataset: df Partner Customer A Alpha A Beta B …
nak5120
  • 4,089
  • 4
  • 35
  • 94
0
votes
1 answer

plot the effect of two categorical factors over an unordered multinomial variable in R

using these data, i want to simultaneously plot the effects of two categorical factors over a multinomial variable. This is as far as ai could go: require(ggplot2) df=read.csv("example.csv") ggplot(df,aes(x=treatment , y=option, group=morph)) + …
Agus camacho
  • 868
  • 2
  • 9
  • 24
0
votes
1 answer

ValueError: Found input variables with inconsistent numbers of samples : [1, 14048]

I am trying to run MultinomiaL Naive bayes and receiving the below error. Sample training data is given. Test data is exactly similar. def main(): text_train, targets_train = read_data('train') text_test, targets_test = read_data('test') …
ComplexData
  • 1,091
  • 4
  • 19
  • 36
0
votes
1 answer

MATLAB. How can we get a 2d multinomial by interpolation

We are given a n x n data. Approximate the funxtion. For example. If we are given 2(1,1), 3(1,2), 4(2,1), 5(2,2) Then we have to interpolate the 2 D- ultinomial as $0*x*y+y+2*x-1$.
0
votes
1 answer

How to get the best subset for a multinomial regression in R?

I am a new R user and I'm using a multinomial regression (i.e. logistic regression with the response variable which has more than 2 classes.) with the function 'vglm' in R. In my dataset there are 11 continuous predictors and 1 response variable…
Hanie Bk
  • 1
  • 2
0
votes
1 answer

How to test joint parameter hypothesis in multinomial logit regression R?

I am trying to test the hypothesis of market efficiency in bookmaker odds for football matches. I have estimated a multinomial logit model with the mlogit package: Model: outcome=log(P1/Px)+log(P2/Px) where P1 is the implicit bookie probability of a…
Chebyshev
  • 1
  • 3
0
votes
1 answer

I'm getting the “Error in if (abs(x - oldx) < ftol)” after formatting data for my logit model

It had worked previously but I've been having trouble with my packages on and off throughout the day, although maybe that has nothing to do with it. I had ran the code below earlier and it had worked. But for the past few hours I keep on getting the…
HP-Nunes
  • 111
  • 1
  • 11