# Directed Clustering of Multivariate Data Based on Linear or Quadratic Latent Variable Models
## 4 Simulation  
We conducted a simulation study to evaluate the accuracy of parameter estimation for the quadratic latent variable model (2), based on an implementation of the EM algorithm according to Section 3.3. We consider a simple scenario where \(x_{i}\) are 2-dimensional data generated according to model (4) from \(K=4\) mixture components, with three samplesizes \(n=100\), \(n=300\), and \(n=500\). The true model parameters are displayed in the left column of Table 1. Figure 2 shows the data structures of the data we used for this simulation study. We generate 300 replicates for each sample size, respectively. For each of the 300 replicates (for each sample size), we run the EM algorithm 20 times to select the best estimates with the smallest BIC value; this process aids in selecting a good starting value for the EM algorithm. The averaged estimates are shown in Table 1, and boxplots of the estimates for some of the parameters are provided in Figures 3-6. Firstly, we observe that as the sample size increases, the boxplots squeeze towards the true values for each parameter, indicating empirically the consistency of the proposed estimation procedure. For the \(z_{k}\), this is less clearly visible, since even at \(n=100\), the interquartile range (IQR) is already very small. We also observe that the averaged estimations in Table 1 are generally very close to their true values, except for the \(\beta\) parameters. However, closer inspection of Figure 5 shows that the estimates of \(\beta_{1}\) and \(\beta_{2}\) are correctly centered; but there is a considerable amount of outliers similarly observed in the boxplots for the \(\eta\) parameters (see Figure 6). We proceed with displaying the mean squared errors (MSEs) for the estimat \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & & \multicolumn{4}{c}{**Average Estimates**} \\ \cline{3-5}  & **True** & \(\boldsymbol{n=100}\) & \(\boldsymbol{n=300}\) & \(\boldsymbol{n=500}\) \\ \hline \(\pi_{1}\) & \(0.1500\) & \(0.1269\) & \(0.1269\) & \(0.1355\) \\ \(\pi_{2}\) & \(0.2000\) & \(0.1949\) & \(0.1954\) & \(0.1946\) \\ \(\pi_{3}\) & \(0.3000\) & \(0.2916\) & \(0.2963\) & \(0.2971\) \\ \(\pi_{4}\) & \(0.3500\) & \(0.3866\) & \(0.3814\) & \(0.3727\) \\ \hline \(z_{1}\) & \(1.2696\) & \(1.2834\) & \(1.2847\) & \(1.2769\) \\ \(z_{2}\) & \(0.2402\) & \(0.2091\) & \(0.2021\) & \(0.2179\) \\ \(z_{3}\) & \(-0.4461\) & \(-0.4635\) & \(-0.4579\) & \(-0.4497\) \\ \(z_{4}\) & \(-1.0637\) & \(-1.0289\) & \(-1.0288\) & \(-1.0451\) \\ \hline \(\alpha_{1}\) & \(5.0000\) & \(5.4230\) & \(5.3237\) & \(5.3444\) \\ \(\alpha_{2}\) & \(15.0000\) & \(14.9822\) & \(15.0769\) & \(15.0253\) \\ \hline \(\beta_{1}\) & \(-5.0000\) & \(-6.6284\) & \(-6.5173\) & \(-6.0477\) \\ \(\beta_{2}\) & \(15.0000\) & \(14.1142\) & \(14.3244\) & \(14.3750\) \\ \hline \(\eta_{1}\) & \(5.0000\) & \(4.8833\) & \(4.8010\) & \(4.9135\) \\ \(\eta_{2}\) & \(10.0000\) & \(10.4077\) & \(10.3825\) & \(10.2027\) \\ \hline \(\sigma_{1}\) & \(1.0000\) & \(1.1239\) & \(1.1701\) & \(1.1103\) \\ \(\sigma_{2}\) & \(2.0000\) & \(2.2411\) & \(2.3176\) & \(2.2107\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation results for all parameters. Figure 2: Simulated data with a sample size of 500. The fitted curve is displayed in black, and the mixture centres are given by red triangles. Table 2; note that, for \(\beta\) and \(\eta\), due to the mentioned presence of outliers, we use the trimmed MSE [32] with a trimming parameter of 0.1. Overall, from these tables and boxplots, we find that the estimators give sensible estimates and that the bias and MSE are reduced with the increase in the sample size.