## 3 Method  
Latent class model could be used as an alternative to the mixed logit model by replacing the continuous distribution with a discreet one. The LC model assumes homogeneous preference across the same class. However, it has been argued that homogenous preference might not hold true, as there might still exist heterogeneity within the same class. Thus, another layer on top of the LC model might be needed to account for the heterogeneity. As the implemented model is an extension of the Mixed-Mixed (MM) model, and the latent class method, the following sections would detail first the standard LC model and then it would discuss its extension. In the latent class model, it is assumed that the population can be grouped into Q finite number of classes. For the LC model, there are various \(\beta_{i}s\) across various latent class where the individuals are allocated to classes based on some discrete distribution. While the groups or classes are assumed to be homogenous across the individuals in a same class with specific coefficients, they are heterogeneous across the other considered groups. The probability of a class q could be written as [14]:  
\[Prob(class=q)=\pi_{q}(\theta),q=1,\ldots,Q \tag{1}\]  
where \(\theta\) is a parameter, which would be used for class allocation. \(\theta\) might be considered as a constant of 1 or other parameters. Where \(\pi_{q}\) is the probability of an individual belonging to a class \(q\), where  
\[\sum_{q\ =\ 1}^{Q}\pi_{q}=1\ \text{and}\ 0\ \leq\ \pi_{q}\ \leq\ 1 \tag{2}\]  
Based on various \(\beta\), and based on \(g\), we would have:  
\[f(y_{i}|x_{i},class=q)=g(y_{i}|x_{i},\beta_{q}) \tag{3}\]  
The above equation considers that observations within a same class are homogenous. However, more flexibility could be given to the parameters by varying them based on some \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Attributes** & **Mean** & **Variance** & **Min** & **Max** \\ \hline Front-seat passenger belt status, belted versus not belted * & 0.32 & 0.217 & 0 & 1 \\ \hline Driver belt condition, not belted versus belted * & 0.140 & 0.120 & 0 & 1 \\ \hline Sunny weather condition, sunny as 1, versus others * & 0.682 & 0.216 & 0 & 1 \\ \hline Number of lanes, 2 lane as versus a single lane * & 1.415 & 0.243 & 1 & 2 \\ \hline Vehicle license, Non-Wyoming residence versus others * & 1.552 & 0.247 & 1 & 2 \\ \hline Time of observation: 11:30–1:30 versus others * & 0.229 & 0.176 & 0 & 1 \\ \hline Time of observation: 1:30–3:30 versus others * & 0.176 & 0.145 & 0 & 1 \\ \hline \hline \end{tabular}
* Reference category as the Min values.  
\end{table} 
Table 1: Descriptive summary of important predictors. continuous distribution. That could be implemented by adding a mixed layer on top of the latent class model. Therefore, the above model could be modified as [14]:  
\[f(y_{i}\Big{|}x_{i},class=q)=g(y_{i}\Big{|}x_{i},\beta_{i|q}) \tag{4}\]  
where \(\beta_{i|q}\) would vary based on some continuous distribution, and it can be written based on some random sampling as:  
\[\beta_{i|q}=\beta_{q}+\omega_{i|q} \tag{5}\]  
The simulated maximum likelihood would be used for model parameters, \(\beta_{i|q}\), estimation. Now the log likelihood of the resultant would be written as:  
\[\mathcal{LL}=\sum\limits_{i\ =\ 1}^{N}\ log\left[\sum\limits_{q\ =\ 1}^{Q}\ \pi_{q}(\theta)\ \frac{1}{R}\sum\limits_{r\ =\ 1}^{R}\frac{\exp[\sum\
olimits_{j\ =\ 1}^{J}y_{ij}(\beta_{q}+\omega_{ir})x_{ij}]}{\sum\
olimits_{j\ =\ 1}^{J}\exp[(\beta_{q}+\omega_{ir})x_{ij}]}\right] \tag{6}\]  
As can be seen from Equation (6), the process of creating a log likelihood (\(\mathcal{LL}\)), could be divided into two parts. First, the class allocation part of \(\pi_{q}(\theta)\), and second, the random sampling of the other parts of the model. Now the process could be summarized as follows:  
1. The first process would be related to a mixed part of the model: 1.