Stochastic Residual Selection in Simulated Annealing for Clusterwise Panel Optimization - Luh Putu Widya Adnyani; Bagus Sartono; Asep Saefuddin; I Made Sumertajaya; Gerry Alfa Dito (Ikatan Ahli Informatika Indonesia (IAII), 2026)
Modeling heterogeneity in panel data requires solving a complex combinatorial partition problem under structural constraints. Although clusterwise regression captures latent group structures with distinct parameters, determining the optimal partition remains computationally challenging due to the vast solution space and susceptibility to local minima. This study proposes a modified simulated annealing (SA) algorithm incorporating a Stochastic Residual Selection (SRS) mechanism, in which candidate units are selected from a high-residual subset rather than deterministically relocating only the unit with the largest residual. The stochastic candidate-size parameter was evaluated using m=1 and m=5, where m=1 represents deterministic selection of the largest residual unit, while m=5 randomly selects one unit from the five largest-residual units for clusterreassignment. The stochastic perturbation enhances global exploration and improves convergence stability in non-convex optimization landscape. Simulation experiments involving 200 individuals observed over three time periods demonstrate that the proposed SRS-SA outperforms standard SA, achieving an Adjusted Rand Index of approximately 0.95 at 1,000 iterations while producing lower Mean Absolute Bias and Mean Squared Error. An empirical application to improved sanitation data across districts and municipalities in Java, Indonesia, further confirms its effectiveness in identifying latent structural heterogeneity. These findings highlight the robustness and computational efficiency gained through stochastic diversification in metaheuristic optimization for constrained clusterwise panel modeling.