title: R mlogit throws Error in solve.default(H, g[!fixed]):system is computationally singular: reciprocal condition number
body: <p>I'm trying to do discrete choice modeling on the below data. Basically, 30 customers have 16 different choices of pizza. They can choose more than 1 type of pizza and the ones they choose is indicated by choice variable.</p>
  
  <pre><code>pizza   cust choice pan thin pineapple veggie sausage romano mozarella oz
  1      1  Cust1      0   1    0         1      0       0      1         0  1
  2      2  Cust1      1   0    1         1      0       0      0         0  0
  3      3  Cust1      0   0    0         1      0       0      0         1  1
  4      4  Cust1      1   0    1         1      0       0      0         0  0
  5      5  Cust1      1   1    0         0      1       0      0         0  1
  6      6  Cust1      0   0    1         0      1       0      1         0  0
  7      7  Cust1      0   0    0         0      1       0      0         0  1
  8      8  Cust1      1   0    1         0      1       0      0         1  0
  9      9  Cust1      0   1    0         0      0       1      0         1  0
  10    10  Cust1      1   0    1         0      0       1      0         0  1
  11    11  Cust1      0   0    0         0      0       1      1         0  0
  12    12  Cust1      0   0    1         0      0       1      0         0  1
  13    13  Cust1      0   1    0         0      0       0      0         0  0
  14    14  Cust1      1   0    1         0      0       0      0         1  1
  15    15  Cust1      0   0    0         0      0       0      0         0  0
  16    16  Cust1      0   0    1         0      0       0      1         0  1
  17     1 Cust10      0   1    0         1      0       0      1         0  1
  18     2 Cust10      0   0    1         1      0       0      0         0  0
  19     3 Cust10      0   0    0         1      0       0      0         1  1
  20     4 Cust10      0   0    1         1      0       0      0         0  0
  </code></pre>
  
  <p>When I use the below command to transform my data. I tried making few changes here like adding <code>chid.var = "chid"</code> and <code>alt.levels=c(1:16)</code>. If I use both <code>alt.levels</code> and <code>alt.var</code> it gives me an error saying pizza already exists and will be replaced. However, I get no error if I use either of them.</p>
  
  <pre><code>pz &lt;- mlogit.data(pizza,shape = "long",choice = "choice",
                    varying = 4:8, id = "cust", alt.var =  "pizza")
  </code></pre>
  
  <p>Finally, when I use the mlogit command, I get this error.</p>
  
  <pre><code>mlogit(choice ~ pan + thin + pineapple + veggie + sausage + romano + mozarella + oz, pz)
  
  Error in solve.default(H, g[!fixed]) : 
    system is computationally singular: reciprocal condition number = 8.23306e-19
  </code></pre>
  
  <p>This is my first post on stackoverflow. I visit this site very often and so far never needed to post as I found solutions already. I went through almost all similar posts like <a href="https://stackoverflow.com/questions/13521937/error-in-mlogit-error-in-solve-defaulth-gfixed-system-is-computationall">this</a> one but in vain. I'm new to discrete choice modeling so I don't know if I'm making any fundamental mistake here. </p>
  
  <p>Also, I'm not really sure what <code>chid.var</code> does.</p>