# Optimized Weighted Nearest Neighbours Matching Algorithm for Control Group Selection
## 5 Results
### Results of the Scenario II
Comparing the performance of the PSM-based methods with the nearest-neighbour based approaches, we can see that they perform similarly (PSM_DYN) or slightly worse (PSM_02) for the distribution-based indices (HB, DDI). However, they gave significantly worse results for the pairwise similarity indices (NNI, GDI). Comparing the results of the NNM, MMM, WNNEM and WNNSA methods, we can see that they produced similarly good results for all metrics, although the WNNSA method slightly outperformed the other methods. Comparing the WNNEM and WNNSA methods, the results are similar to Scenario I, but the differences between the two methods are more significant in this case. \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline  & & **NNM** & \multicolumn{4}{c}{**MMM**} & \multicolumn{4}{c}{**SM**} \\ \hline  & \(min\) & \(avg\) & \(max\) & \(min\) & \(avg\) & \(max\) & \(min\) & \(avg\) & \(max\) & \\ \hline HB(\(p\)) & 0.432 & 0.968 & 1.000 & 0.686 & 0.974 & 1.000 & 0.140 & 0.724 & 0.995 & \\ DDI(\(d\)) & 0.034 & 0.061 & 0.093 & 0.035 & 0.058 & 0.084 & 0.617 & 0.710 & 0.800 & \\ \hline NNI(\(d\)) & 0.300 & 0.325 & 0.362 & 0.289 & 0.305 & 0.331 & 0.718 & 0.789 & 0.858 & \\ GDI(\(d\)) & 0.043 & 0.058 & 0.081 & 0.054 & 0.071 & 0.107 & 0.637 & 0.728 & 0.815 & \\ \hline  & \multicolumn{4}{c}{**PSM\_02**} & \multicolumn{4}{c}{**PSM\_DYN**} & \multicolumn{4}{c}{**WNNEM**} & \multicolumn{4}{c}{**WNNSA**} \\ \hline  & \(min\) & \(avg\) & \(max\) & \(min\) & \(avg\) & \(max\) & \(min\) & \(avg\) & \(max\) & \(min\) & \(avg\) & \(max\) \\ \hline HB(\(p\)) & 0.523 & 0.941 & 1.000 & 0.729 & 0.960 & 1.000 & 0.769 & 0.969 & 1.000 & 0.815 & 0.991 & 1.000 \\ DDI(\(d\)) & 0.062 & 0.102 & 0.162 & 0.050 & 0.072 & 0.102 & 0.032 & 0.056 & 0.078 & 0.034 & 0.052 & 0.071 \\ \hline NNI(\(d\)) & 0.591 & 0.661 & 0.705 & 0.528 & 0.640 & 0.678 & 0.285 & 0.303 & 0.321 & 0.300 & 0.318 & 0.335 \\ GDI(\(d\)) & 0.314 & 0.411 & 0.463 & 0.279 & 0.376 & 0.446 & 0.035 & 0.046 & 0.057 & 0.043 & 0.056 & 0.069 \\ \hline \end{tabular}
\end{table} 
Table 2: Measures for evaluating the group-level similarities of case and control groups in Scenario II. HB(\(p\)) denotes the \(p\)-value of the Hansen and Bowers test, DDI(\(d\)) represents the dissimilarity value of the Distribution Dissimilarity Index, NNI(\(d\)) stands for the dissimilarity value of the Nearest Neighbour Index, and GDI(\(d\)) is the dissimilarity value of the Global Dissimilarity Index. In the case of HB(\(p\)), the higher value is better, while in the case of DDI(\(d\)), NNI(\(d\)) and GDI(\(d\)), the lower value is better. Figure 5: Distribution of continuous covariates in Scenario II. Distribution of the \(t\)-test \(p\)-values calculated for each covariate separately based on all simulations in Scenario II. The effectiveness of the WNNSA method is also clearly observable in Figure 6. The advantage of the WNNSA method is more pronounced in this conflicting environment since the interquartile range of the associated box plot is much smaller than the interquartile range of the box plot of the modified WNNEM method. At the same time, the top of both box diagrams is at a similar level. In addition, it can be seen, that although the extended WNNEM method performs slightly better than the PSM methods in the conflict environment, a more significant quality improvement occurs when the WNNSA method is used. Figure 6 also illustrates that, although the NNM and MMM methods also performed well on this dataset, the result of the WNNSA method outperforms them. The results of the SM method are only given in text format: \(Q1=0.6105\), \(Q2=0.7810\), and \(Q3=0.9093\). Comparing the WNNEM and WNNSA methods, it can be seen that the WNNSA method achieved significantly better results than the WNNEM method for the dataset presented in Scenario II. The main reason of this is that there are more conflict cases in this dataset, which the WNNSA method is more efficient in resolving. In 21 out of 100 datasets, the two methods achieved equally good results.