title: issue with mlogit package related to modalities
body: <p>I am using the mlogit package to run a multinomial mixed effect model. The data are in the long format to begin with. I am trying to determine whether a variable is related to differences in a categorical outcome, sleep duration, that has 3 categories (0,1,2). Sample data are:</p>
  <pre><code>id  sleep  var1
  1    0     1.5
  1    2     1.5
  2    1      2
  2    1      2
  3    0      1
  </code></pre>
  <p>I tried running the following code:</p>
  <pre><code>mldata &lt;- mlogit.data(df, choice=&quot;sleep&quot;, shape =&quot;long&quot;)
  
  mlogit.model1 &lt;- mlogit(sleep ~ 1 | var1, data = df, reflevel = &quot;0&quot;)
  
  Error in dfidx::dfidx(data = data, dfa$idx, drop.index = dfa$drop.index,  :
    The choice variable must have exactly two modalities
  </code></pre>
  <p>In a previous post, I read that this message was caused by including the &quot;varying&quot; function of the mlogit package. However, I didn't include that so I don't understand what is going on.</p>
  <p>Can someone please help?</p>