Heterogeneous data require modeling methods that capture structural differences across subpopulations rather than imposing a single global relationship. Clusterwise linear regression (CLR) is able to provide this flexibility despite the high computational cost. Although effective, classical simulated annealing (SA) algorithms is sensitive to initial parameters and prone to premature convergence. This study proposes an improved SA-based approach by incorporating a simple stochastic modification. Rather than consistently relocating the observation with the largest residual, the algorithm randomly selects an observation from the top-(m) largest residuals at each iteration.. This mechanism allows the algorithm to explore more possible solutions while still moving toward better results. The proposed method was evaluated through simulation studies and an application to district-level poverty data in Indonesia. The results show that the modified algorithm generally provides better clustering accuracy and smaller parameter bias than the standard simulated annealing algorithm in clusterwise regression models. The real-data application also identified nine clusters with different socio-economic characteristics, showing the importance of using analytical approaches and policies that account for regional diversity.
Copyrights © 2026