title: Most straightforward R package for setting subject as random effect in mixed logit model
body: <p>I have a dataset in which individuals, each belonging to a particular group, repeatedly chose between multiple discrete outcomes.</p>
  
  <pre><code>subID  group   choice
  1      Big     A
  1      Big     B
  2      Small   B
  2      Small   B
  2      Small   C
  3      Big     A
  3      Big     B
  .       .      .
  .       .      .
  </code></pre>
  
  <p>I want to test how group membership influences choice, and want to account for non-independence of observations due to repeated choices being made by the same individuals. In turn, I planned to implement a mixed multinomial regression treating group as a fixed effect and subID as a random effect.  It seems that there are a few options for multinomial logits in R, and I'm hoping for some guidance on which may be most easily implemented for this mixed model:</p>
  
  <p>1) <a href="https://www.rdocumentation.org/packages/nnet/versions/7.3-12/topics/multinom" rel="nofollow noreferrer">multinom</a> - GLM, via nnet, allows the usage of the multinom function. This appears to be <a href="https://stats.idre.ucla.edu/r/dae/multinomial-logistic-regression/" rel="nofollow noreferrer">a nice, clear, straightforward option</a>... for <strong>fixed</strong> effect models.  However is there a manner to implement random effects with multinom?  <a href="https://stats.stackexchange.com/questions/299229/test-repeated-within-subjects-observations-of-multinomial-categorical-data">A previous CV post</a> suggests that multinom is able to handle mixed-effects GLM with poisson distribution and a log link.  However, I don't understand (a) why this is the case or (b) the required syntax. Can anyone clarify?</p>
  
  <p>2) <a href="https://cran.r-project.org/web/packages/mlogit/index.html" rel="nofollow noreferrer">mlogit</a> - A fantastic package, with incredibly helpful vignettes.  However, the "mixed logit" documentation refers to models that have random effects related to <strong>alternative specific covariates</strong> (implemented via the <code>rpar</code> argument).  My model has no alternative specific variables; I simply want to account for the random intercepts of the participants.  Is this possible with mlogit?  Is that variance automatically accounted for by setting subID as the <code>id.var</code> when shaping the data to long form with <a href="https://www.rdocumentation.org/packages/mlogit/versions/0.4-1/topics/mlogit.data" rel="nofollow noreferrer">mlogit.data</a>? EDIT: I just found an example of "tricking" mlogit to provide random coefficients for variables that vary across individuals (very bottom <a href="http://www.polsci.ucsb.edu/faculty/glasgow/ps206/ps206_mixed.r" rel="nofollow noreferrer">here</a>), but I don't quite understand the syntax involved.</p>
  
  <p>3) <a href="https://cran.r-project.org/web/packages/MCMCglmm/index.html" rel="nofollow noreferrer">MCMCglmm</a> is evidently another option.  However, as a relative novice with R and someone completely unfamiliar with Bayesian stats, I'm not personally comfortable  parsing <a href="https://stackoverflow.com/questions/22020050/multinomial-mixed-logit-model-mlogit-r-package">example syntax of mixed logits with this package</a>, or, even following the syntax, making guesses at priors or other needed arguments.  </p>
  
  <p>Any guidance toward the most straightforward approach and its syntax implementation would be thoroughly appreciated. I'm also wondering if the random effect of subID needs to be nested within group (as individuals are members of groups), but that may be a question for CV instead. In any case, many thanks for any insights.</p>