title: Multinomial logit model in R on grouped data, data conversion and mlogit set-up
body: <p>I want to estimate the parameters of a multinomial logit model in R and wondered how to correctly structure my data.  I’m using the “mlogit” package.</p>
  
  <p>The purpose is to model people's choice of transportation mode.  However, the dataset is a time series on aggregated level, e.g.:</p>
  
  <p><a href="https://i.stack.imgur.com/CBSMJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CBSMJ.jpg" alt="enter image description here"></a></p>
  
  <p>This data must be reshaped from grouped count data to ungrouped data.  My approach is to make three new rows for every individual, so I end up with a dataset looking like this:</p>
  
  <p><a href="https://i.stack.imgur.com/4IfsV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4IfsV.jpg" alt="enter image description here"></a></p>
  
  <p>For every individual's choice in the grouped data I make three new rows and use chid to tie these three 
  rows together. I now want to run :
  mlogit.data(MyData, choice =  “choice”, chid.var = “chid”, alt.var = “mode”).</p>
  
  <p>Is this the correct approach? Or have I misunderstood the purpose of the chid function? </p>